I think I reproduced the PyAUI bug

I think I reproduced the original PyAUI bug I've been talking about
months ago. Here's the code. I'm hoping you'll tell me I did something
horribly wrong in this code which is why things don't work.

After you run: Float panel_2, don't let go of the mouse, then hover it
on each of the dock icons to see if they work. Some of them won't. Let
go of panel_2, as floated. Now float panel_1. You can't dock it. Now
let it go too to remain floated. Now you can't dock either panel.

Ram.

···

#############################################
import wx

from garlicsim_wx.general_misc.third_party import aui
# Of course, you'd want to import aui from wherever you keep your
# SVN version of it.

class Frame(wx.Frame):
    def __init__(self, *args, **kwargs):
        wx.Frame.__init__(self, *args, **kwargs)
        self.aui_manager = aui.AuiManager(self)

        panel_1 = wx.Panel(self, size=(100, 100),
style=wx.SUNKEN_BORDER)

        self.aui_manager.AddPane(
            panel_1,
            aui.AuiPaneInfo().Right().Caption('panel_1')
        )

        panel_2 = wx.Panel(self, size=(100, 100),
style=wx.SUNKEN_BORDER)

        self.aui_manager.AddPane(
            panel_2,
            aui.AuiPaneInfo().Center().Caption('panel_2')
        )

        self.aui_manager.Update()
        self.Show()

app = wx.App()

frame = Frame(None)
frame.Show()

app.MainLoop()

#############################################

End of message.

If you add another pane with the CenterPane() flag then it works as expected.

auibug.py (992 Bytes)

···

On 4/3/10 3:38 PM, cool-RR wrote:

I think I reproduced the original PyAUI bug I've been talking about
months ago. Here's the code. I'm hoping you'll tell me I did something
horribly wrong in this code which is why things don't work.

After you run: Float panel_2, don't let go of the mouse, then hover it
on each of the dock icons to see if they work. Some of them won't. Let
go of panel_2, as floated. Now float panel_1. You can't dock it. Now
let it go too to remain floated. Now you can't dock either panel.

--
Robin Dunn
Software Craftsman

Is this a workaround, or is it an official requirement when using PyAUI?

Ram.

···

On Mon, Apr 5, 2010 at 7:38 PM, Robin Dunn robin@alldunn.com wrote:

On 4/3/10 3:38 PM, cool-RR wrote:

I think I reproduced the original PyAUI bug I’ve been talking about

months ago. Here’s the code. I’m hoping you’ll tell me I did something

horribly wrong in this code which is why things don’t work.

After you run: Float panel_2, don’t let go of the mouse, then hover it

on each of the dock icons to see if they work. Some of them won’t. Let

go of panel_2, as floated. Now float panel_1. You can’t dock it. Now

let it go too to remain floated. Now you can’t dock either panel.

If you add another pane with the CenterPane() flag then it works as expected.

Robin Dunn

I hope we have a response from Andrea on that. I personally find it quite natural to work without a CenterPane, Like in Photoshop for example.

···

On Tue, Apr 6, 2010 at 6:18 AM, Robin Dunn robin@alldunn.com wrote:

On 4/5/10 11:58 AM, cool-RR wrote:

On Mon, Apr 5, 2010 at 7:38 PM, Robin Dunn <robin@alldunn.com > > mailto:robin@alldunn.com> wrote:

On 4/3/10 3:38 PM, cool-RR wrote:



    I think I reproduced the original PyAUI bug I've been talking about

    months ago. Here's the code. I'm hoping you'll tell me I did

    something

    horribly wrong in this code which is why things don't work.



    After you run: Float panel_2, don't let go of the mouse, then

    hover it

    on each of the dock icons to see if they work. Some of them

    won't. Let

    go of panel_2, as floated. Now float panel_1. You can't dock it. Now

    let it go too to remain floated. Now you can't dock either panel.





If you add another pane with the CenterPane() flag then it works as

expected.

--

Robin Dunn

Is this a workaround, or is it an official requirement when using PyAUI?

I’m not sure. I always have a pane with CenterPane set, but I don’t know if it designed to require one or not.

Robin Dunn

Software Craftsman

http://wxPython.org


Sincerely,
Ram Rachum

I think you still need a CenterPane - see the thread in April 2009
“[wxpython-users] agw.aui - no CenterPane can not redock”

Werner

···

On 06/04/2010 09:27, cool-RR wrote:

I hope we have a response from Andrea on that. I
personally find it quite natural to work without a CenterPane, Like in
Photoshop for example.

Link to the old thread:

http://groups.google.com/group/wxpython-users/browse_thread/thread/85fa41e839b6c420/f08b62f9fff6fc87

I read it, but I’m not sure what you’re saying exactly. What do you mean “I think you still need a CenterPane”? How can I make a Photoshop-style application when I’m forced to make a CenterPane? Or you meant I need a CenterPane to get PyAUI working? Please clarify.

Ram.

···

On Tue, Apr 6, 2010 at 10:22 AM, werner wbruhin@free.fr wrote:

On 06/04/2010 09:27, cool-RR wrote:

I hope we have a response from Andrea on that. I
personally find it quite natural to work without a CenterPane, Like in
Photoshop for example.

I think you still need a CenterPane - see the thread in April 2009
“[wxpython-users] agw.aui - no CenterPane can not redock”

Werner

Okay, I added:
http://trac.wxwidgets.org/ticket/11914

If someone can tell me how I can make a Photoshop-style interface while still using a center pane, please do.

Ram.

···

On Wed, Apr 7, 2010 at 12:51 PM, werner wbruhin@free.fr wrote:

On 07/04/2010 11:53, cool-RR wrote:

On Tue, Apr 6, 2010 at 10:22 AM, werner wbruhin@free.fr > > wrote:

On 06/04/2010 09:27, cool-RR wrote:

I hope we have a response from Andrea on that. I
personally find it quite natural to work without a CenterPane, Like in
Photoshop for example.

I think you still need a CenterPane - see the thread in April 2009
“[wxpython-users] agw.aui - no CenterPane can not redock”

Werner

Link to the old thread:

http://groups.google.com/group/wxpython-users/browse_thread/thread/85fa41e839b6c420/f08b62f9fff6fc87

I read it, but I’m not sure what you’re saying exactly. What do
you mean “I think you still need a CenterPane”? How can I make a
Photoshop-style application when I’m forced to make a CenterPane? Or
you meant I need a CenterPane to get PyAUI working? Please clarify.

The later, i.e. using PyAui and I think also wx.AUI needs a CenterPane.

You might want to add an enhancement ticket on
http://trac.wxwidgets.org/ , so it won’t get forgotten.

Werner

Hi,

I hope we have a response from Andrea on that. I personally find it quite
natural to work without a CenterPane, Like in Photoshop for example.

I think you still need a CenterPane - see the thread in April 2009
"[wxpython-users] agw.aui - no CenterPane can not redock"

Werner

Link to the old thread:

http://groups.google.com/group/wxpython-users/browse_thread/thread/85fa41e839b6c420/f08b62f9fff6fc87
I read it, but I'm not sure what you're saying exactly. What do you mean
"I think you still need a CenterPane"? How can I make a Photoshop-style
application when I'm forced to make a CenterPane? Or you meant I need a
CenterPane to get PyAUI working? Please clarify.

The later, i.e. using PyAui and I think also wx.AUI needs a CenterPane.

You might want to add an enhancement ticket on http://trac.wxwidgets.org/
, so it won't get forgotten.

Werner

Okay, I added:
wxTrac has been migrated to GitHub Issues - wxWidgets
If someone can tell me how I can make a Photoshop-style interface while
still using a center pane, please do.

Werner is right, both wxAUI and agw.aui *require* a CenterPane to be
there. To avoid this issue, an alternative could be to wrap
(SWIG-wrap) wxRecursiveLayout from wxCode, or to port it to
pure-Python as I did for many other widgets. That is a possibility I
have thought about many times in the past, but then it felt redundant
as we already have AUI. I'll give it a second thought.

Supporting the kind of layout you want with wxAUI or agw.aui is next
to impossible, unless a major re-design is envisaged. I honestly don't
think to have the strength now to do that. So, I'll leave your bug
report there for some possible taker...

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

==> Never *EVER* use RemovalGroup for your house removal. You'll
regret it forever.
The Doomed City: Removal Group: the nightmare <==

···

On 7 April 2010 12:22, cool-RR <cool-rr@cool-rr.com> wrote:

On Wed, Apr 7, 2010 at 12:51 PM, werner <wbruhin@free.fr> wrote:

On 07/04/2010 11:53, cool-RR wrote:
On Tue, Apr 6, 2010 at 10:22 AM, werner <wbruhin@free.fr> wrote:

On 06/04/2010 09:27, cool-RR wrote:

Hi,

Werner is right, both wxAUI and agw.aui require a CenterPane to be

there. To avoid this issue, an alternative could be to wrap

(SWIG-wrap) wxRecursiveLayout from wxCode, or to port it to

pure-Python as I did for many other widgets. That is a possibility I

have thought about many times in the past, but then it felt redundant

as we already have AUI. I’ll give it a second thought.

That would not be very relevant for me, so do it only if you need it (or someone else does, but not me.) It will take so long until a Python version of wxRecursiveLayout reaches the maturity of PyAUI that it would not be relevant for me, and even then it will have its own set of problems that we don’t have with PyAUI.

Supporting the kind of layout you want with wxAUI or agw.aui is next

to impossible, unless a major re-design is envisaged. I honestly don’t

think to have the strength now to do that. So, I’ll leave your bug

report there for some possible taker…
Andrea.

Okay, now maybe there’s a clever hack you can think of? Like having a dummy center pane or something?

Ram.

···

On Wed, Apr 7, 2010 at 6:14 PM, Andrea Gavana andrea.gavana@gmail.com wrote:

That's what I was going to suggest. Unless I'm missing something I would think that having a pane with no content, no caption, etc. to act as your center pane would give you the effect you are looking for.

···

On 4/7/10 9:44 AM, cool-RR wrote:

Okay, now maybe there's a clever hack you can think of? Like having a
dummy center pane or something?

--
Robin Dunn
Software Craftsman

I have tried the “blank pane” method now. It works quite well. Now though I have the problem of widgets getting flickery and unresponsive when floated. I think I’ll postpone the investigation of this to after my 0.4 release.

Thanks for your help,

Ram.

···

On Wed, Apr 7, 2010 at 7:08 PM, Robin Dunn robin@alldunn.com wrote:

On 4/7/10 9:44 AM, cool-RR wrote:

Okay, now maybe there’s a clever hack you can think of? Like having a

dummy center pane or something?

That’s what I was going to suggest. Unless I’m missing something I would think that having a pane with no content, no caption, etc. to act as your center pane would give you the effect you are looking for.

Robin Dunn

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en