17 Jul 16:58
[TraitsGUI] ChainedWizard _next_wizard_changed() method
From: Richard Lincoln <r.w.lincoln@...>
Subject: [TraitsGUI] ChainedWizard _next_wizard_changed() method
Newsgroups: gmane.comp.python.enthought.devel
Date: 2008-07-17 14:58:56 GMT
Subject: [TraitsGUI] ChainedWizard _next_wizard_changed() method
Newsgroups: gmane.comp.python.enthought.devel
Date: 2008-07-17 14:58:56 GMT
I would like to create a chained wizard with a first page where I
select from a list of other wizards and this determines the next
wizard. Please find attached an example of what I am trying to
achieve.
The problem that I have is that when the next_wizard trait of a
ChainedWizard is changed the _next_wizard_changed() method calls
_create_buttons().
def _next_wizard_changed(self, old, new):
""" Handle the next wizard being changed. """
if new is not None:
self.controller.next_controller = new.controller
# if self.control is not None:
# self._create_buttons(self.control)
# self._update()
return
As I understand it, _create_buttons() is normally called from
_create_contents() and returns a sizer which is then added to the main
sizer. The _next_wizard_changed() method does not use the returned
sizer and the created buttons are placed in the top-left corner of the
dialog. The main problem is that there is no end to the subsequent
pages of the wizard and I get the following traceback if I keep
clicking Next.
Traceback (most recent call last):
(Continue reading)
RSS Feed