WINDEV Concepts

Part 4: Advanced concepts 145 User Macro-Code: UMC in practice 1 What is the UMC? UMC is an option that allows advanced users to create their own processes in an application. End users can type WLanguage code and include it in an existing application. The new processes can be sent to the developer so that they can be added to the source code of the application. Multiple WLanguage functions are available to the users. However, the developer can set certain restrictions. For example, do not allow the use of file management functions. To maintain data integrity, the commands to update or add records are not available to the users. 2 How to enable/disable the UMC? This feature can be disabled for a window or for the entire application. To disable the UMC on a window, check "Forbid the use of U.M.C." in the "Details" tab of the window description. To set the UMC on the project: 1. Open the project description window: on the "Project" tab, in the "Project" group, click "Description". 2. Go to the "Advanced" tab. Click the "User Macro-Code" button to allow or prevent users from entering User Macro-Code in the entire application. Two options are available if you allow it: • Allow the use of HFSQL commands ( HReadFirst , HFilter , HAdd , etc.). • Accept the suggestions made by the users. The second option allows the application to send an email when the user creates a macro code. The "*.MCU" file corresponding to the macro code is sent as an attachment. This allows you to easily retrieve the suggestions made by the users and automatically include them in your project! WINDEV includes an option for importing "*.MCU" files (on the "Project" tab, in the "Project" group, expand "Import" and select "User Macro-Codes...").

RkJQdWJsaXNoZXIy NDQ0OA==