Broken advanced task example #78

Closed
jonathanrocher opened this Issue Feb 4, 2013 · 3 comments

Comments

Projects
None yet
2 participants
Collaborator

jonathanrocher commented Feb 4, 2013

Running the advanced pyface/task example doesn't work neither with WX nor with Qt.

Admins-MacBook-Pro:advanced jrocher$ ETS_TOOLKIT='qt4' python run.py
Traceback (most recent call last):
File "run.py", line 37, in
main(sys.argv)
File "run.py", line 26, in main
window.add_task(task)
File "/Users/jrocher/Projects/ETS_trunk/pyface/pyface/tasks/task_window.py", line 180, in add_task
state.central_pane = task.create_central_pane()
File "/Users/jrocher/Projects/ETS_trunk/pyface/examples/tasks/advanced/example_task.py", line 67, in create_central_pane
self.editor_area = SplitEditorAreaPane()
File "/Users/jrocher/Projects/ETS_trunk/pyface/pyface/toolkit.py", line 92, in init
raise NotImplementedError("the %s pyface backend doesn't implement %s" % (ETSConfig.toolkit, oname))
NotImplementedError: the qt4 pyface backend doesn't implement SplitEditorAreaPane

pberkes was assigned Feb 5, 2013

Contributor

pberkes commented Feb 5, 2013

@jonathanrocher Could you please double check if you have an outdated pyface or a pythonpath conflict? It should work as advertised.

Collaborator

jonathanrocher commented Feb 5, 2013

Pietro: thanks for looking into this. I was up-to-date with pyface but needed to be up-to-date on other packages in ETS. Being on the trunk of ETS fixed that example indeed. The example is really nice.

I did find something though when opening a new tab:
Traceback (most recent call last):
File "/Users/jrocher/Projects/ETS_trunk/pyface/examples/tasks/advanced/python_editor.py", line 171, in eventFilter
self.control.emit(QtCore.SIGNAL('lostFocus'))
AttributeError: 'PythonEditorEventFilter' object has no attribute 'control'

I will try and go down there to fix it.

@ghost

ghost commented Sep 10, 2014

@jonathanrocher

I've workaround it by adding a new property to class PythonEditorEventFilter

    @property
    def control(self):
        return self.parent()

    PythonEditorEventFilter.control = control

@pberkes I suggest to patch class PythonEditorEventFilter replacing self.control with self.parent()

@rkern rkern added a commit that referenced this issue Sep 10, 2014

@rkern rkern BUG: Fix reference to attribute.
Fixes #78.
99a71b4

rkern closed this in #112 Sep 23, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment