The OnPageChanging reports the wrong transition. From page index 0 to
0. Then another one is sent, and then the OnPageChanged is correct,
old to new. But the second OnpageChanged is again bogus.
The OnPageChanging reports the wrong transition. From page index 0 to
0. Then another one is sent, and then the OnPageChanged is correct,
old to new. But the second OnpageChanged is again bogus.
This is one of those things that everybody wonders about, but it's been that way forever as far as I know. Asking on wx-users might get some more information.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
I was depending on next / previous selection ID because I only
populate on list at the time on the notebooks. I solved it
differently, now I only need to know which one is going to be
selected. That unfortunately can't be cought with the CHANGING event,
only with the CHANGED event. I will see if I can report this on the
wx-users list when I get behind my PC again to give a more detailed
description.
Thanks,
- Jorgen
···
On Wed, Apr 23, 2008 at 12:15 AM, Robin Dunn <robin@alldunn.com> wrote:
Jorgen Bodde wrote:
> Hi All,
>
> It's very weird that 2 pairs of events are sent when a wx.Notebook
> changes page. This can be seen at the wxPython demo:
>
> OnPageChanging, old:0, new:0, sel:0
> OnPageChanging, old:0, new:0, sel:0
> OnPageChanged, old:0, new:1, sel:0
> OnPageChanged, old:1, new:1, sel:1
>
> The OnPageChanging reports the wrong transition. From page index 0 to
> 0. Then another one is sent, and then the OnPageChanged is correct,
> old to new. But the second OnpageChanged is again bogus.
>
This is one of those things that everybody wonders about, but it's been
that way forever as far as I know. Asking on wx-users might get some more
information.
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
That might work, but the reason why I mentioned it is because it is a
bug of course ;-). I suspect double events being sent, maybe upon
mouse up and mouse release I don't know.
Thanks for the tip!
- Jorgen
···
On Wed, Apr 23, 2008 at 1:58 PM, <python@bdurham.com> wrote:
Jorgen,
I noticed the same behavior as you.
Can you use the OnPageChanged event and ignore page change events where
old, new, sel are all the same value?