Re: Feedback to TableEditor (Was: TabularEditor)
Quoting bryce hendrix <bhendrix@...>:
> The TabularEditor is pretty feature limited because it is based on the
> wx ListEditor. The features you are requesting should all be in the
> TableEditor. Let us know if you have any questions/suggestions.
It seems that I can't reorder table rows using the cursor keys or by
dragging them with the mouse.
I also encountered a bug when I try to link to tables. A chapter
contains a List(Scene). In the UI, I have two tables and I want to
show the list of scenes in the second table when a chapter is selected
in the first table. Here is the code:
...
selectedChapter = Instance(Chapter, transient=True)
scenes = Property
...
UIItem('object.scenes', show_label = False,
editor = TableEditor (...)
...
@property_depends_on('selectedChapter')
def _get_scenes(self):
return [] if self.selectedChapter is None else \
self.selectedChapter.scenes
...
When I try to run this code, I get this exception:
...
File
"C:\prg\EPD-Python25\lib\site-packages\traits-3.0.2-py2.5-win32.egg\entho
ught\traits\has_traits.py", line 2892, in on_trait_change
listener.register( self )
File
"C:\prg\EPD-Python25\lib\site-packages\traits-3.0.2-py2.5-win32.egg\entho
ught\traits\traits_listener.py", line 451, in register
value = getattr( self, type )( new, name, False )
File
"C:\prg\EPD-Python25\lib\site-packages\traits-3.0.2-py2.5-win32.egg\entho
ught\traits\traits_listener.py", line 678, in _register_simple
return next.register( getattr( object, name ) )
File
"C:\prg\EPD-Python25\lib\site-packages\traits-3.0.2-py2.5-win32.egg\entho
ught\traits\traits_listener.py", line 362, in register
if (new is None) or (new is Undefined) or (new in self.active):
File "C:\prg\EPD-Python25\lib\weakref.py", line 274, in __contains__
return wr in self.data
TypeError: list objects are unhashable
Please let me know if you need more info to track this bug down.
Regards,
--
--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.pdark.de/