With ORDA and Object Notation features becoming more prominent in 4D it can be useful to access the documentation to clarify the functions of the 4D classes. With the classic 4D language, commands allowed access to the documentation for the command by using the F1 shortcut or the contextual menu on the command in the method editor.
With functions, the access to the documentation is a bit more nuanced due to the difficulty of determining if the function is a 4D function, a custom function, or an attribute. To confirm that the function is a 4D function, the parent item that the function is being applied to must be the specific class.
For example, with collection functions, the following will allow access to the documentation for the .push() function:
|var $myCol : Collection|
However, the the nuances come when the functions are applied to a attributes. The following will not allow access to the documentation:
|var $myObj : Object|
A quick way to tell if the parent item will allow the documentation for a function to be opened is to check it's autocomplete suggestion.
As shown below New collection auto suggests functions of the collection class and as such will allow access to the documentation:
Thus the following code will allow opening the documentation for .push():
Split string, which also returns a collection does not auto suggest any functions of the collection class, and as such will not allow access to the documentation:
Thus the following code will not allow opening the documentation for .push():