Create regular traits view of Chaco plot items via configure_traits() method

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Create regular traits view of Chaco plot items via configure_traits() method

Markus Gonser
Hello everybody,
 
I currently have the problem described below. I tried to look for a solution via google, but did not find any. The problem was already mentioned in
 
 
but no solution was give.
 
 
I wanted to use the normal configure_traits() method on Chaco objects to edit their properties. For example:
 
>> from chaco.Plot import Plot
>> plt = Plot()
>> plt.configure_traits()
 
------------------------------------------------------------
Traceback (most recent call last):
  File "<ipython console>", line 1, in <module>
  File "C:\Python27\lib\site-packages\traits\has_traits.py", line 2563, in configure_traits
    kind, handler, id, scrollable, args )
  File "C:\Python27\lib\site-packages\traitsui\wx\toolkit.py", line 219, in view_application
    id, scrollable, args )
  File "C:\Python27\lib\site-packages\traitsui\wx\view_application.py", line 80, in view_application
    scrollable, args ).ui.result
  File "C:\Python27\lib\site-packages\traitsui\wx\view_application.py", line 123, in __init__
    super( ViewApplication, self ).__init__()
  File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 8081, in __init__
    wx.App.__init__(self, redirect, filename, useBestVisual, clearSigInt)
  File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 7981, in __init__
    self._BootstrapApp()
  File "C:\Python27\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 7555, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "C:\Python27\lib\site-packages\traitsui\wx\view_application.py", line 140, in OnInit
    args       = self.args )
  File "C:\Python27\lib\site-packages\traitsui\view.py", line 433, in ui
    ui.ui( parent, kind )
  File "C:\Python27\lib\site-packages\traitsui\ui.py", line 218, in ui
    self.rebuild( self, parent )
  File "C:\Python27\lib\site-packages\traitsui\wx\toolkit.py", line 140, in ui_live
    ui_live.ui_live( ui, parent )
  File "C:\Python27\lib\site-packages\traitsui\wx\ui_live.py", line 68, in ui_live
    ui_dialog( ui, parent, NONMODAL )
  File "C:\Python27\lib\site-packages\traitsui\wx\ui_live.py", line 99, in ui_dialog
    ui.owner.init( ui, parent, style )
  File "C:\Python27\lib\site-packages\traitsui\wx\ui_live.py", line 223, in init
    sw = panel( ui, window )
  File "C:\Python27\lib\site-packages\traitsui\wx\ui_panel.py", line 349, in panel
    content[0], ui )
  File "C:\Python27\lib\site-packages\traitsui\wx\ui_panel.py", line 523, in fill_panel_for_group
    create_panel )
  File "C:\Python27\lib\site-packages\traitsui\wx\ui_panel.py", line 672, in __init__
    self.add_items(content, panel, self.sizer)
  File "C:\Python27\lib\site-packages\traitsui\wx\ui_panel.py", line 1031, in add_items
    editor.prepare( item_panel )
  File "C:\Python27\lib\site-packages\traitsui\editor.py", line 155, in prepare
    self.init( parent )
  File "C:\Python27\lib\site-packages\traitsui\wx\compound_editor.py", line 76, in init
    editor.prepare( panel )
  File "C:\Python27\lib\site-packages\traitsui\editor.py", line 157, in prepare
    self.update_editor()
  File "C:\Python27\lib\site-packages\traitsui\wx\list_editor.py", line 190, in update_editor
    list_sizer = wx.FlexGridSizer(len(self.value), (1 + resizable) * factory.columns, 0, 0 )
TypeError: object of type 'NoneType' has no len()
 
The reference mentioned above mentioned a bug in the traits editor ... do you know anything on the topic? Or do you have any solution to it? My ultimate goal is to write kind of an universal Data Viewer for Measurement Data.
For functions such as line colors and stuff I would just like to make the default traits view available on the GUI. However I really would like to ommit to create custom views for that as the functionality "should" already be there within the traits framework.
 
Looking foward to hear any sugeestions!
 
Regards,
 
Markus
 

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev