4D v14.3Component installation and compatibility |
|||||||||||||||||||||||||||||||||||||
|
4D v14.3
Component installation and compatibility
|
Interpreted components | Compiled components | ||||
Unicode | Non-Unicode | Unicode | Non-Unicode | ||
Interpreted host database | Unicode | X | X | X (*) | X (*) |
Non-Unicode | X | X | X (*) | X (*) | |
Compiled host database | Unicode | - | - | X | - |
Non-Unicode | - | - | - | X |
(*) If several compiled components are installed, they must operate in the same Unicode mode.
Notes:
For more information about inter-component and host database-component exchanges, refer to Interaction between components and host databases.
An interpreted component developed under Mac OS can be installed in a Windows environment and vice versa.
On the other hand, compiled components must be executed on the same type of platform they were compiled on, unless they were compiled for both platforms.
Components installed in the server database are automatically transferred to the client machines via a mechanism resembling that of plug-ins.
We do not recommend modifying a component in client/server mode since the changes are stored locally and the component will not be updated on the server machine.
The components are loaded when the host database is opened.
ARRAY TEXT($arrComponents_Txt;0)
COMPONENT LIST($arrComponents_Txt)
If(Find in array($arrComponents_Txt;"ComponentA")>0) // Component A does not have to be present
EXECUTE METHOD("ComponentAMethod")
End if
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 more information, refer to the description of this database method in the 4D Language Reference manual.
Note that for security reasons, you must explicitly authorize the execution of this 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 option on the Security page the Database Settings:
Unlike other shared objects (see Shared and unshared objects), shared project methods have a “physical” existence in the database and are not simply created by code execution.
Consequently, naming conflicts can occur when a shared project method of the component has the same name as a project method of the host database. In this case, when the code is executed in the context of the host database, it is the host database method that is called. This means that it is possible to “mask” a component method with a custom method (for example to obtain a different functionality).
Of course, when the code is executed in the component, it is the component method that is called.
This masking will be indicated by a warning in the event of compilation of the host database.
Note: If two components share methods having the same name, an error is generated when the host database is compiled.
Product: 4D
Theme: Developing and installing 4D components
4D Design Reference ( 4D v14 R2)
4D Design Reference ( 4D v14 R3)
4D Design Reference ( 4D v14.3)
4D Design Reference ( 4D v14 R4)
Inherited from : Component installation and compatibility ( 4D v13.4)