enthought/traitsui — pull request #182 by itziakos (2014-10-07 02:55:58+00:00)
Title: Feature/advanced tuple editor

This PR augments the TupleEditor to support extra validation provided by the user in the Editor factory or defined in the trait (see ValidatedTuple PR #https://github.com/enthought/traits/pull/205).

example:

```python
>>> from traits.api import Int, HasStrictTraits, Tuple
>>> from traitsui.api import View, Item, TupleEditor
>>> class Model(HasStrictTraits):
... value_range = Tuple(Int(0), Int(1))
... view = View(Item('value_range', editor=TupleEditor(validation=lambda x: x[0] < x[1])))
...
>>> model = Model()
>>> model.configure_traits()
>>>
```

![image](https://cloud.githubusercontent.com/assets/403930/4536738/165dbf9e-4dcd-11e4-9b54-d56962e06732.png)
**normal values**

![image](https://cloud.githubusercontent.com/assets/403930/4536745/30218d52-4dcd-11e4-8e07-70d16d0d8fd2.png)
**invalid field**

![image](https://cloud.githubusercontent.com/assets/403930/4536751/479bc574-4dcd-11e4-8f21-538a297fb151.png)
**invalid tuple** (x[0] > x[1])