Please note: this project is inactive since early 2006

 
3.3.2 Checking constraints: key by key

To verify a given value for a specific attribute, say on lastName for a Writer object, you use the method validateValueForKey:

    aWriter.validateValueForKey('Cleese', 'lastName')

This check that the value 'Cleese' is a valid value for Writer.lastName. Note that this value is directly given as a parameter and is not stored, nor searched, within the object: the validation can thus be done without actually assigning the value to an attribute (but the ``global'' checks we'll see hereafter do not work that way).


Subsections
Comments are welcome: Sebastien Bigaret / Modeling Home Page
Hosted by:SourceForge.net Logo