enthought / enthought/traitsui
RangeEditor Exception and Crash in TableEditor
- Dominant language
- Python
- Stars
- 306
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
When using either a Range trait in an ObjectColumn in a TableEditor or a trait with a RangeEditor in an ObjectColumn, exceptions are thrown when trying to update the cell colors and python.exe crashes with the Range trait when setting the value outside the acceptable range.
Traits/TraitsUI 4.4 on Windows 7.
``` python
import traits.api as tr
import traitsui.api as trui
class Row(tr.HasTraits):
r=tr.Range(low=0.0,high=10.0, desc='Crashes python.exe when editing outside of range')
f=tr.Float(desc='Always throws AttributeError [control is None] when trying to set cell color')
table_editor = trui.TableEditor(
columns = [trui.ObjectColumn(name='r', label='Range', style='text'),
trui.ObjectColumn(name='f', label='Float w/ RangeEditor',style='text',
editor=trui.RangeEditor(low=0.0,high=10.0)),
],
)
class Table(tr.HasTraits):
rows = tr.List(Row)
view = trui.View(trui.UItem('rows@',editor=table_editor),
resizable=True,
)
t=Table()
t.rows.append(Row())
t.rows.append(Row())
t.configure_traits()
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.