4D v14Video script |
||
|
4D v14
Video script
Video script
Now we're going to learn create a component. A component is a separate 4D database that is integrated into a host database, which then has access to the methods and forms available in this component. We're going to:
and in this new application:
Then in the information about the method we specify that this method is shared between the component and the host database and then exit the database. In our database:
In the list of methods, we can see the component methods including "Component v13" that we just created with the ALERT method. We can substitute this ALERT command for all other calls to the 4D ALERT command. To do this, we just need to replace 1 character. Of course, we could do it using "Replace in the contents". Once these changes are made, we can test them, for example, using the Test_Variables form where we have, on the calculation here, the ALERT command that is going to be executed, and here we are on the component method. We can check it by passing a 2nd parameter: it still works, we get the text passed as a parameter. Our component is working properly and we can add as many methods to it as we like. |
PROPERTIES
Product: 4D ARTICLE USAGE
Self-training ( 4D v13) |