Using change methods to allow special input
June 14th, 2001 3:13:28 pm pst by Sterling CamdenThe Synergy UI Toolkit allows you to override the validation of a field by supplying a change method. The result of the normal Toolkit validation for the field is passed to the method, and your method can return that or override the validation and return its own status. The downloadable example below demostrates how to use a change method to extend the allowable input for a field. In this example, we have a date field, but we want to allow the user to type “today” instead of a valid date in order to get today’s date. The change method first tests to see if the Toolkit validated the date field. If it failed the Toolkit’s validation, then we test the input for the word “today” (upper or lower case). If so, we fill the data area with today’s date and return an OK status. Otherwise, we return the error generated by the Toolkit’s validation.
Posted in OpenVMS, SynergyDE, UI Toolkit, Unix, Windows | No Comments » RSS 2.0




