Inherits from
- TraitHandler: enthought.traits.trait_handlers.TraitHandler
Attributes
Inherited from base classes
Method summary
Inherited from base classes
- arg_error(self, method, arg_num, object, name, value)
- create_editor(self)
- dup_arg_error(self, method, arg_num, object, name)
- error(self, object, name, value)
- full_info(self, object, name, value)
- get_editor(self, trait = None)
- inner_traits(self)
- is_valid(self, object, name, value)
- keyword_error(self, method, object, name, value)
- missing_arg_error(self, method, arg_num, object, name)
- repr(self, value)
- return_error(self, method, object, value)
Methods
- __init__(self, aFunc)
Creates a TraitFunction handler.
Parameters
- aFunc : function
- A function to validate trait attribute values
Description
The signature of the function passed as an argument must be of the form function ( object, name, value ). The function must verify that value is a legal value for the name trait attribute of object. If it is, the value returned by the fucntion is the actual value assigned to the trait attribute. If it is not, the function must raise a TraitError exception.
- info(self)
- validate(self, object, name, value)