4d / docs Goto Github PK
View Code? Open in Web Editor NEWProducts Documentation
License: Creative Commons Attribution 4.0 International
Products Documentation
License: Creative Commons Attribution 4.0 International
Enter your comment here:
wrong:
$txt:=$myFile.getText("UTF-8", Document with LF)
correct:
$txt:=$myFile.getText("UTF-8"; Document with LF)
see https://discuss.4d.com/t/file-delete-la-documentation-se-prend-les-pieds-dans-le-tapis/27966
Si le fichier existe déjà sur disque, la fonction ne fait rien (aucune erreur n’est générée).
If the file does not exist on disk, the function does nothing (no error is generated).
The word "asymetric" is misspelled.
Change the sentence:
"The CryptoKey
class in the 4D language encapsulates an asymetric encryption key pair."
to:
"The CryptoKey class in the 4D language encapsulates an asymmetric encryption key pair."
1 (or any value other than 0) = Start animation
Animation for barber pole and spinner starts only at value 1. Other positive or negative values don't start the animation. Tested in 4D v19R6 on Windows. Please fix or update documentation.
Alias Attributes: LINK FAILS TO WORK
I click "Alias Attributes". (See the red arrow in image #1.)
A new page opens, and I see "Alias Attributes."
But the examples shown appear to deal with Entity Class, not Alias Attributes. And the sidebar shows Entity Class highlighted.
Clicking the link "Alias Attributes" fails to move to the "Alias Attributes" section. (See the red arrows in image #2.)
Here's the actual "Alias Attribute" section, which is further down the documentation page. (See image #3 and red arrow.)
Please enter your comment:
https://developer.4d.com/docs/API/CollectionClass/#example-3-4
//["Alain Martin","Jane Doe","John Smith","John Doe"]
//["Lyon France","Eching Germany","Paris France","Berlin Germany"]
must be someting like that
//$name=["Alain Martin","Jane Doe","John Smith","John Doe"]
//$address=["Lyon France","Eching Germany","Paris France","Berlin Germany"]
but not really, $address contains object, not string? maybe exemple not correct
I launch it and have some errors "compare function doesn't provide consistent results"
Enter your comment here: in the section where you highlight in yells the GitHub Markdown Guide there is a spelling mistake.
It is spelt: 'GitHug Markdown guide'.
I suspect you want it to be: GitHub Markdown Guide.
Enter your comment here:
The documentation refers to looking at the Storage command. I went to the language manual for 19R3 Beta and this command is not found in the language manual.
I looked in 19R2 and v19 and the Storage command is found.
Thanks!
Hope you are having a great day.
Jody Bevan
Enter your comment here:
The documentation correctly states:
Predefined constants appear underlined by default in the 4D Method editor.
The example given though does not show the constant being underlined.
Ya, I know, not a big deal but for a new programmer to 4D that would be confusing.
Thanks for decades of great documentation.
Jody Bevan
Enter your comment here:
Here is another simple fix you may want to make. This i from the v19 R3 Beta discussion on Control Flow. Note in the text here that it states:
'he expression is TRUE only if both methods are TRUE.'
A letter 'T' is missing the the word the.
Note that the Boolean expression is always fully evaluated. Consider in particular the following test:
If(MethodA & MethodB)
...
End if
Copy
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:
The result object may also include an additional boolean property named wasNotLocked
.
Example:
{
"wasNotLocked": true,
"success": false
}
The method getBoxInfo may cause a 4D runtime error.
If the box name does not exist, a runtime error occurs (#1).
The runtime error is unexpected.
The documentation mentions no error.
The value returned by getBoxInfo is null
for a non-existent mailbox (#2).
The getBoxInfo command returns null
without a runtime error.
Enter your comment here:
Hi its important to mention that after having configured both the webserver and rest server in the settings area for the new settings to take affect you must quit and restart 4d or your calls will get this error in the response.
{"__ERROR":[{"message":"REST login failed","componentSignature":"dbmg","errCode":1822}]}
Enter your comment here:
Est-ce normal qu'en sélectionnant la langue FRANCAIS seuls les titres de chapitre soient en français et tout le texte détaillé en anglais ?
Great stuff! MarkDown is fantastic, and 4D's support seems quite nice.
A couple of glitches:
There's a typo : "For more information, see the GitHug Markdown guide".
I cannot reproduce the described behavior for a # Description
line in 18 R5 MacOS. Instead of an auto-generated prototype and my first sentence, I get the prototype only. Here's a basic example:
# Description
**DescriptionH1** (Text; Longint) : Text
I've tried ## Description
instead, and have tried to put an extra CR after the end. No difference.
Other ideas:
Method_GetPrototype (Method name) : Text that you display in the hover now.
Sounds like you're supporting overloading (pure evil). If so
Method_GetPrototypes (Method name) : Collection of texts that you display in the hover for some obects now.
Better:
*Method_GetParameters (Method name) : Collection
For the moment, parameters only have the attributes #
and label
(using the def
system). The options would be a lot richer and better with a few more attributes on def
:
required
a Boolean.default
listing default value, when parameter is not included.allowed
if you've got an allowed list or range.excluded
if you've got an excluded list or range.check/rule
if you support it. Would be nice to have a range/series/value check rule implemented in the declaration as an in-line rule, or via a function call.Bonjour,
Est-til possible d'afficher l'image car actuellement il retourne array(1) { ["ok"]=> bool(true) }
Technologie utilisé PHP
env('LOCMAT_URL') // ip local
$url = 'http://' . env('LOCMAT_URL') . '/rest/Articles(652)/ImageCAB?$imageformat=best&$version=2&$expand=ImageCAB';
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'username-4D: SQL',
'password-4D: LocmatSQL',
'session-4D-length: 60',
'Cookie: 4DSID_Locmatv18=' . $_COOKIE['4DSID_Locmatv18'] . ';WASID4D=' . $_COOKIE['WASID4D']
),
));
$response = curl_exec($curl);
curl_close($curl);
$decodedData = json_decode($response, JSON_PRETTY_PRINT);
$data3 = $decodedData;
var_dump($data3);
Merci pour votre réponse
Enter your comment here:
I would like to suggest that the documentation be revised to indicate that the command Get edited text
also works with the form event On After Edit
.
Enter your comment here:
In your examples of using objects you rightly show examples with multiple dot notation:
eg:
$age:=$myObjVar.employee.age
What is not in your examples / explanation is how one creates such an object. I understand that to some this may seen obvious, but certainly not to all. I therefore had to write some code to figure out how to do this. Fortunately past use of objects helped point me in what I think is the right direction. What I did that got it to work is as follows:
C_OBJECT(<>vO_Var)
<>vO_Var:=New object
<>vO_Var.Name:=New object
<>vO_Var.Name.Surname:="Bevan"
<>vO_Var.Name.Given:="Jody"
ALERT(<>vO_Var.Name.Given+" "+<>vO_Var.Name.Surname)
This worked, but is this correct, and the recommended way?
PS: If you do not want these types of comments of how I think the manual can be improved (from my perspective) let me know and I will keep them to myself, and not clutter up your in basket of work. I am not here to be a pest, but rather as another set of eyes and person coming from a less close view's understanding.
Thanks
Jody Bevan
Hi doc team,
the example on how to distinguish scalar blob from 4D.Blob class doesn't return the expected True value, but False instead. I suppose it's because the test is made on an empty blob. See more here:
https://discuss.4d.com/t/object-blob-property-byte-comparison-issue/21874/3?u=arnaud.de.montard
Enter your comment here:
Enter your comment here:
I think there is a word missing in the sentence below. Just before the word 'to' there should be a noun describing who will know. This could be 'you', 'the developer', 'the user'
The Method called on error command allows to know the name of the method installed by ON ERR CALL for the current process.
.exposed is not a standalone property of a dataclass
It is a sub-property of getInfo
myDataClass.exposed
returns an error
mydataClass.GetInfo().exposed
returns a boolean
Both the summary and the description should be updated.
Enter your comment here:
1- ""UTF-8"
in setText
2-in getText
... you get:
// $Text = "id name price vat\r\n3 thé 1.06€\t19.6\r\n2\tcafé\t1.05€\t19.6"
// \t = tab
// \r = CR
I do not understand the block and why comment //
There is no $Text
so maybe
... you get for $txt
:
"id name price vat\r\n3 thé 1.06€\t19.6\r\n2\tcafé\t1.05€\t19.6"
with \t
a tabulation and \r the CR. line delimiter
3(not an error)-an example with optional parameters for getText?
Enter your comment here:
In 4D.Folder
files
or 4D.Folder
folder
fk recursive | 1 | The collection contains files or folders of the specified folder and its subfolders
-- | -- | --
The collection contains files (not folders) for 4D.Folder
files
The collection contains folders (not files) for 4D.Folder
folders
but maybe it's due to doc generation and a common description of fk recursive
constant at only one place
Enter your comment here:
I think there is a word missing in one of the sentences in this block of text. This is in the last sentence in this copied text. In front of the word 'be'. A few different words could be inserted to have the sentence read better. I think for the meaning of this sentence the word 'to' is the best fit.
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.
These tags are generally be inserted as HTML type comments () but an xml-compliant alternative syntax is available for some of them.
The section titled [Using Project Methods](https://developer.4d.com/docs/WebServer/qodly-studio#using-project-methods) shows the following text.
Where in the 4D application do we select Scope > Catalog?
Enter your comment here:
Hi, is it possible in the documentation to be more explicit about the "var:" syntax ?
What about ? Somehow it is possible to use a form object syntax ?
My goal is to be able to put some images for buttons not only from the component RESOURCES, or Form, but from host.
Thanks
I suggest to add 2 things
1 - the description of the bakupHistory.json file
1.1 - main structure, an object with the successive paths of the database path as properties:
{dataBasePathOLD
[
{backupObj}
...
{backupObj}
]
{dataBasePathNEW
[
{backupObj}
...
{backupObj}
]
}
1.2 - the backup object structure
attachments: collection of objects {attachmentPath : text ; found : boolean}
backupNumber: integer
backupPath: text
datapat: text
duration: integer
endingDate: timestamp
logPath: text
scheduledDate: timestamp
startingDate: timestamp
status: integer
2 - an example of code to read something in the file:
++++++++++++++++
//lastBackupDescription_srv -> ojb
//returns an object, description of the last backup
//
#DECLARE->$out_o : Object
var $o : Object
var $backupHistory_o : Object
var $DBbackup_c : Collection
var $backupHistory_t : Text
var $json_t : Text
var $DBpath_t : Text
var $i_l : Integer
$out_o:=New object()
If (Application type=4D Remote mode)
$out_o.error:=Current method name+" not on 4D Remote"
Else
$o:=File(Backup history file)
If ($o=Null)
$out_o.error:=Current method name+" backup history file not found"
Else
$backupHistory_t:=$o.platformPath
$json_t:=Document to text($backupHistory_t)
$backupHistory_o:=JSON Parse($json_t)
$DBpath_t:=Structure file //
ARRAY TEXT($prop_at; 0x0000)
OB GET PROPERTY NAMES($backupHistory_o; $DBpath_at)
$i_l:=Find in array($DBpath_at; $DBpath_t)
If ($i_l<1)
$out_o.error:=Current method name+" no backups found for database "+$DBpath_t
Else
$DBbackup_c:=$backupHistory_o[$DBpath_t] //database backups under the actual database path
$out_o:=$DBbackup_c[$DBbackup_c.length-1] //last backup
End if
End if
End if
++++++++++++++++
Enter your comment here:
https://developer.4d.com/docs/en/FormObjects/propertiesScale.html#barber-shop
I think the properties is not max
and a bool, it s a copy paste from other property
Enter your comment here:
I am trying to read the license. Arriving on th home page of the 4D site, no way to find my way. I finally got by chance on the development page : no mention of license; the Documentation button, then Managing your license.
Interesting : this page, as far as I can see, contains no link to the text iteslf of the licenses
There must be a better user friendly ergonomy, I guess
Dominique Poulain
test
Enter your comment here:
When you have your example of how this works, how it will be displayed in the code editor has different text than anywhere in the ...md file and in the Explorer view.
In the constants section:
fk mobileApps folder | 10 | IS NOT Associated to filesystem: "/DATA"
Enter your comment here:
Regular or shared object
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.
I am a bit confused by this statement in the documentation.
In the past the scope of an object was determined by the type of variable the object was placed into (local/process/interprocess). We used objects extensively (local/Interprocess) types.
If what is stated here in the manual were true (then a lot of my code would break).
Therefore I did test methods with (local/process/Interprocess) object variables. The scope of the object variables was as it has been, so no change in the behavior.
I therefore think that it would appropriate in the documentation to explain this in more detail so that people will get a full explanation of scope of an object variable.
If there is a reason for not explaining this (ie. upcoming change in behavior) this would be important to know. If all my interprocess object variables if not declared as shared Objects will now not be available to other processes that would be a huge change in the behavior of 4D.
Thank you for the decades of great 4D Documentation.
Jody Bevan
Adding a reference to "Copy Parameters" here would be nice, as it provides a valuable alternative to Parameter indirection.
The documentation appears to say the opposite of what happens when you .unscubscribe()
a mailbox.
Note the text highlighted in yellow.
The word reduce should be replaced with increase.
The converse sentence reads:
This allows you to reduce the number of mailboxes you usually see.
The revised sentence should read:
This allows you to increase the number of mailboxes you usually see.
Enter your comment here:
Typo:
In Overview,
Network configuration using TSL:
Should be TLS
Qodly Studio can be used offline.
But we could comment that a couple of features are not available in Qodly Studio for 4D without an internet access:
ServerDataCollection hyperlink to https://doc.4d.com/4Dv19R6/4D/19-R6/ServerDataCollection.300-6011712.en.html goes to a 404 page.
Enter your comment here:
Page : https://developer.4d.com/docs/en/Users/editing.html
It would be nice, courteous not to say adequate to start this section with a warning that the Users and groups tool is becoming obsolete and should not be used in single-user configuration
Enter your comment here:
In reference to Example 2:
The comment for the first line states: 'It is 23:00 p.m.'
There is no such time. When using the 24 hour time format there is no PM or AM. It is all counted as hours. Thus the comment should be: It is 23:00 hours'.
This is the use in the USA and Canada by Police, and around the world for airplane pilots (the too professions I was trained in that have specifications for this).
A minor issue, but clarity and correct nomenclature make the manual look better.
NB
Again, please do not hesitate to tell me that you would prefer to not get these ideas for changes to the manual.
Sincerely
Jody Bevan
there are duplicate References for
On the setGlobalStamp() function was a reference for getGlobalStamp()
See attached patch.
0001-duplicate-references-in-DataStoreClass.patch
Enter your comment here:
It would be great to know which of these properties are mandatory, i.e. the minimum list of properties required to have a valid 4D form.
Enter your comment here:
Link to toCollection is wrong.
It's set to https://developer.4d.com/docs/en/API/EntitySelectionClass.html#tocollection
It should be https://developer.4d.com/docs/en/API/EntitySelectionClass.html#tocollection-
I was looking at how to test a pointer to see that it does not have a value of NIL.
A short explanation on this issue that we can encounter, and could test for would be helpful.
Thanks!
Enter your comment here:
I think that the word 'catched' is used and some dictionaries do accept this as a proper english, but that would only be in later years. The more correct word for this would be 'caught'.
Jody Bevan
Enter your comment here:
I think a word is missing in this sentence that will make the reading flow better.
Just before the word 'information' there should be helping words for readability. This could be: 'types of', 'pieces of'
Within the custom error method, you have access to several information that will help you identifying the error:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.