How Do I ... : Work with complex parts : Test using the Form Input Checker
Test using the Form Input Checker
Start external programsStart external programsNo tip for this topicExample: Check social security entriesExample: Check social security entriesMake reusable formsMake reusable forms
You can use the Form Input Checker to validate the data type of user input in child parts. Child parts are parts contained in an entire window, form, group box, or other parent part.
The Form Input Checker initiates the checking when an event, such as pressing a push button, occurs. If the user enters an incorrect data type, it displays a message box notifying the user of the incorrect entry.
One way to initiate the checking follows:
1. Open a Composition Editor on your visual part.
2. Place a Form Input Checker part Form Input Checker icon on the free-form surface. The part is in the Data Entry category.
Now, make the following connections:
Connect the verificationRoot attribute of the Form Input Checker part to the self attribute of the window or other parent part whose contents you want checked.
Connect the event which initiates the checking, such as the clicked event of a push button, to the check action of the Form Input Checker.
Connect the checkFailed event of the Form Input Checkerto its showErrorToUser action. (This connection appears as a green, triangle-shaped arrow on the Form Input Checker part.)
Connect the checkSucceeded event of the Form Input Checker to an action of a parent part, such as the closeWidget action of a window.
When you use your application, if you enter invalid data in child parts of the parent part, a message prompter is displayed. If you enter valid data, the action specified for the checkSucceeded connection runs.
Last modified date: 08/14/2019