def _field_changed ( self, name, old, new ):
        """ Updates the underlying tuple when any field changes value.
        """
        index = int( name[ 1: ] )
        value = self.editor.value
        if new != value[ index ]:
            self.editor.value = tuple( 
                [ getattr( self, 'f%d' % i ) for i in range( self.fields ) ] )


# Define the TupleEditor class.
dataset/ETHPy150Open enthought/traitsui/traitsui/editors/tuple_editor.py/TupleStructure._field_changed/original