You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the demo at examples/demo/Advanced/NumPy_array_tabular_editor_demo.py I get the following exception when hovering over the table.
OnGetItemAttr
attr.SetFont( font )
File "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/wx/_controls.py", line 4163, in SetFont
return controls.ListItemAttr_SetFont(_args, *_kwargs)
TypeError: in method 'ListItemAttr_SetFont', expected argument 2 of type 'wxFont const &'
Running from master on OSX 10.6.
The text was updated successfully, but these errors were encountered:
In this snippet from traitsui/wx/tabular_editor.py (lines 134-136),
font = editor.adapter.get_font( object, name, row )
if font is not None:
attr.SetFont( font )
the adaper's get_font() method is returning the string "Courier 10", but the method attr.SetFont() expects a wx Font object. The example works if the line
font = 'Courier 10'
is changed to
font = Font('Courier 10')
I just pushed this change, and a similar change for Python_source_browser.py, so these examples should now work.
However, I think the TabularAdapter and/or backend-dependent editor should handle a string, since a Font trait is supposed to be able to handle being assigned a value such as "Courier 10", and the TabularAdapter knows that the special attribute called 'font' should be a Font trait.
When running the demo at examples/demo/Advanced/NumPy_array_tabular_editor_demo.py I get the following exception when hovering over the table.
OnGetItemAttr
attr.SetFont( font )
File "/Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/wx/_controls.py", line 4163, in SetFont
return controls.ListItemAttr_SetFont(_args, *_kwargs)
TypeError: in method 'ListItemAttr_SetFont', expected argument 2 of type 'wxFont const &'
Running from master on OSX 10.6.
The text was updated successfully, but these errors were encountered: