Richard Lincoln | 17 Jul 16:58

[TraitsGUI] ChainedWizard _next_wizard_changed() method

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)

Martin Chilvers | 17 Jul 23:07

Re: [TraitsGUI] ChainedWizard _next_wizard_changed() method

Hi there,

I haven't looked into this, but I just thought it would be worth pointing out that Phil Thompson has 
been working on the wizards just lately (to get the Qt version going), and so it may be that a bug 
has crept in under wx....

He is on holiday at the moment, I'll try to take a look at it tomorrow (since its late over here!)...

Martin

Richard Lincoln wrote:
> 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()
(Continue reading)


Gmane