The 4D language allows you to develop outstanding business applications. Many of you have taken the initiative to create tools that streamline specific tasks: code, validating links to external elements like images, converting legacy code to ORDA, managing XLIFF resource files, or facilitating refactoring. These custom solutions enhance productivity and foster innovation.
In 4D 20 R8, the FORM EDIT command has evolved. You can now open a form and select a form object.
For instance, you can list the objects in a form from an analysis and introspection tool. Double-clicking on an element in the list will open the form, and you can select the form object to modify one of its properties using the new syntax of the command.
The FORM EDIT command takes the form name as the first parameter and the form object or group name to select as the second parameter. The second parameter is optional.
FORM EDIT($formName; $objectName)
For example, you use the Compile Project command, and display the list of errors returned by the command in a listbox collection. When you click on an “open” button, you want to open the form or method that contains the error. Simply write:
If (Form.currentItem.code.type="formObjectExpression")
FORM EDIT(Form.currentItem.code.formName; Form.currentItem.code.objectName)
Else
METHOD OPEN PATH(Form.currentItem.code.path)
End if
And yes, for the “inputFirstname” object, we have an uppercase/lowercase error in the data source expression.
This new feature will allow you to easily access an object’s properties without having to navigate through the different pages of the form. For more details, I recommend checking out the documentation page for the command.
Happy coding!