If you want to control exactly when user input is checked, you can write a script that can associate a data type with a part at any given time.
Try creating a new visual part similar to the one in the previous example. For this example, just create one State Text part and one OK push button and leave the data type of the State Text part at the default (none).
Then add two event-to-action connections:
checkForm | dataType string | dataType := AbtUSAStateConverter new. string := (self subpartNamed: 'StateText') string. dataType displayToObject: string ifError: [:err | CwMessagePrompter errorMessage: 'Please enter a valid USA state.'. (self subpartNamed: 'StateText') setFocus].
Even though no data type was set for the Text part, when the script runs, it creates a USA State data type and checks for a valid state by sending the user input string the displayToObject:ifError: message. If the check fails, the statements inside the error block are run.