User's Guide

Testing your new type

Now see if your new data type works by creating a new visual part with one Text part on the Window part. Open the settings of the Text part and select Prime Number from the Data type Drop-down List of the converter property.

Test your visual part and try typing both valid and invalid data. You should see an error message (such as ** error **) in the field whenever you type an invalid value. If not, go back and check the acceptsAsDisplayToObjectInput: method you wrote.

Creating more data types

When you create your own data types, try to inherit from the data types that VisualAge provides. This way, the code you write is simpler, because you don't have to check for all the error conditions that VisualAge already checks for. You can inherit from any of the VisualAge classes specified in Inheriting from existing data types.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]