def eval_when ( self, condition, object, trait ):
        if condition != '':
            value = bool( eval( condition, globals(), self._menu_context ) )
            setattr( object, trait, value )

#-------------------------------------------------------------------------------
#  Helper class for toolkit-specific editors to implement 'reversed' option:
#-------------------------------------------------------------------------------
Evaluates a condition within a defined context and sets a specified
dataset/ETHPy150Open enthought/traitsui/traitsui/editors/table_editor.py/BaseTableEditor.eval_when