pyAui native mini frames

2 views
Skip to first unread message

Cody Precord

unread,
Dec 17, 2009, 11:11:50 PM12/17/09
to wxpyth...@googlegroups.com
Hi Andrea,

I just ran a couple of quick tests on OSX with the latest changes
hopefully will have a chance to look more this weekend


1) When initially undocking a pane the mouse cursor is down in the
client area of the frame and not on the title bar when its being
dragged. During the initial undocking if the mouse is not released the
dragging is very smooth.

If the mouse is let go and frame is left floating, then moving to drag
it by titlebar it causes the frame to jerk and shake all around while
it is being dragged it appears that the movement calculations are
expecting the mouse at the lower position below the titlebar where it
was when it was initially undocked.

The toolbar panes do not seem to suffer from this issue

2) Got this traceback when dragging the top left toolbar around in
various positions it only happened once and I haven't been able to
make it happen again though.

Traceback (most recent call last):
File "//usr/local/lib/wxPython-unicode-2.8.10.1/lib/python2.5/site-
packages/wx-2.8-mac-unicode/wx/_core.py", line 14614, in <lambda>
lambda event: event.callable(*event.args, **event.kw) )
File "/Users/codyprecord/Desktop/devel/agw/agw/aui/
framemanager.py", line 6090, in Update
sizer = self.LayoutAll(self._panes, self._docks, self._uiparts,
False)
File "/Users/codyprecord/Desktop/devel/agw/agw/aui/
framemanager.py", line 5932, in LayoutAll
uiparts = self.LayoutAddDock(middle, row, uiparts, spacer_only)
File "/Users/codyprecord/Desktop/devel/agw/agw/aui/
framemanager.py", line 5526, in LayoutAddDock
pane_positions, pane_sizes = self.GetPanePositionsAndSizes(dock)
File "/Users/codyprecord/Desktop/devel/agw/agw/aui/
framemanager.py", line 5232, in GetPanePositionsAndSizes
raise Exception("Too many action panes!")
Exception: Too many action panes!


3) Sometimes when dragging the tab with the gauge on it to dock in
another notebook control I would get the following Debug assertion:

Debug: /BUILD/wxPython-src-2.8.10.1/src/common/wincmn.cpp(2536):
assert "GetCapture() == this" failed in ReleaseMouse(): attempt to
release mouse, but this window hasn't captured it

Must have a ReleaseCapture call someplace that needs to be guarded
with a HasCapture check.


On the plus side the issue with the crashes when docking panes into an
autonotebook has gone away so panes can now be docked into notebooks
with no problems!


cody

Andrea Gavana

unread,
Dec 18, 2009, 3:22:38 AM12/18/09
to wxpyth...@googlegroups.com
Hi Cody,

2009/12/18 Cody Precord:


> Hi Andrea,
>
> I just ran a couple of quick tests on OSX with the latest changes
> hopefully will have a chance to look more this weekend

Thank you for the testing!

> 1) When initially undocking a pane the mouse cursor is down in the
> client area of the frame and not on the title bar when its being
> dragged. During the initial undocking if the mouse is not released the
> dragging is very smooth.
>
> If the mouse is let go and frame is left floating, then moving to drag
> it by titlebar it causes the frame to jerk and shake all around while
> it is being dragged it appears that the movement calculations are
> expecting the mouse at the lower position below the titlebar where it
> was when it was initially undocked.
>
> The toolbar panes do not seem to suffer from this issue

I have committed a small change right now, could you please see if it
fixes the problem? Windows seems to be happy with my code, so I can't
say what's wrong in these calculations...

> 2) Got this traceback when dragging the top left toolbar around in
> various positions it only happened once and I haven't been able to
> make it happen again though.
>
> Traceback (most recent call last):
>   File "//usr/local/lib/wxPython-unicode-2.8.10.1/lib/python2.5/site-
> packages/wx-2.8-mac-unicode/wx/_core.py", line 14614, in <lambda>
>     lambda event: event.callable(*event.args, **event.kw) )
>   File "/Users/codyprecord/Desktop/devel/agw/agw/aui/
> framemanager.py", line 6090, in Update
>     sizer = self.LayoutAll(self._panes, self._docks, self._uiparts,
> False)
>   File "/Users/codyprecord/Desktop/devel/agw/agw/aui/
> framemanager.py", line 5932, in LayoutAll
>     uiparts = self.LayoutAddDock(middle, row, uiparts, spacer_only)
>   File "/Users/codyprecord/Desktop/devel/agw/agw/aui/
> framemanager.py", line 5526, in LayoutAddDock
>     pane_positions, pane_sizes = self.GetPanePositionsAndSizes(dock)
>   File "/Users/codyprecord/Desktop/devel/agw/agw/aui/
> framemanager.py", line 5232, in GetPanePositionsAndSizes
>     raise Exception("Too many action panes!")
> Exception: Too many action panes!

Uhm, this shouldn't really happen...

> 3) Sometimes when dragging the tab with the gauge on it to dock in
> another notebook control I would get the following Debug assertion:
>
> Debug: /BUILD/wxPython-src-2.8.10.1/src/common/wincmn.cpp(2536):
> assert "GetCapture() == this" failed in ReleaseMouse(): attempt to
> release mouse, but this window hasn't captured it
>
> Must have a ReleaseCapture call someplace that needs to be guarded
> with a HasCapture check.

I have put a HasCapture check for all the ReleaseCapture we got in
agw.aui, so hopefully this will not happen again... it is unfortunate
that the debug message doesn't tell us on which line of the Python
code this assert happens.

> On the plus side the issue with the crashes when docking panes into an
> autonotebook has gone away so panes can now be docked into notebooks
> with no problems!

I am glad it works now... let's hope to fix the other issues :-D .
BTW, do you (and anyone else using a Mac) think that the docking
guides are out of place on the Mac?

Andrea.

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

Cody Precord

unread,
Dec 18, 2009, 9:40:54 AM12/18/09
to wxpyth...@googlegroups.com
Hi,

On Dec 18, 2009, at 2:22 AM, Andrea Gavana wrote:


I have committed a small change right now, could you please see if it
fixes the problem? Windows seems to be happy with my code, so I can't
say what's wrong in these calculations...

It does drag smooth now regardless of initial undocking or moving around afterwards. When initially undocking the mouse still goes to the area below the title bar though like if you drag out the tree pane the mouse is on first node in the tree when dragging the window.


Uhm, this shouldn't really happen...

Must have been a miracle then ;p

I have put a HasCapture check for all the ReleaseCapture we got in
agw.aui, so hopefully this will not happen again... it is unfortunate
that the debug message doesn't tell us on which line of the Python
code this assert happens.

It was hard to reproduce before but I couldn't get it to happen again after this so hopefully it is gone.


Found one more that may affect all platforms.

1) In the demo drag the bottom sash so that the bottom pane is small
2) Drag out the tree pane and drag it towards the bottom pane till the auto notebook guide shows up
3) note that it below the window since there is not space for it to fit over the window (not a problem)
4) Drag the pane over that guide that is off the frame

Traceback (most recent call last):
  File "/Users/codyprecord/Desktop/devel/agw/agw/aui/framemanager.py", line 8882, in OnLeftUp
    self.OnLeftUp_DragFloatingPane(event)
  File "/Users/codyprecord/Desktop/devel/agw/agw/aui/framemanager.py", line 9382, in OnLeftUp_DragFloatingPane
    self.Update()
  File "/Users/codyprecord/Desktop/devel/agw/agw/aui/framemanager.py", line 6083, in Update
    self.UpdateNotebook()
  File "/Users/codyprecord/Desktop/devel/agw/agw/aui/framemanager.py", line 6291, in UpdateNotebook
    raise Exception("Odd notebook docking")
Exception: Odd notebook docking


I am glad it works now... let's hope to fix the other issues :-D .
BTW, do you (and anyone else using a Mac) think that the docking
guides are out of place on the Mac?


I would say that it is not an element or trait you see in any other kind of traditional mac app but neither is it on windows the only app I can think of is Visual Studio. The docking art feels out of place with exception of the aero one is kind in the ballpark. I am not a purist by any means though by any means as long as something doesn't bring back memories of open motif widget based apps on aix it doesn't tend to be much of an issue to me. (oh the horror, writing that resulted in a brief flashback lol)



Cody


Andrea Gavana

unread,
Dec 18, 2009, 10:55:54 AM12/18/09
to wxpyth...@googlegroups.com
Hi Cody,

2009/12/18 Cody Precord <codyp...@gmail.com>:


> Hi,
> On Dec 18, 2009, at 2:22 AM, Andrea Gavana wrote:
>
> I have committed a small change right now, could you please see if it
> fixes the problem? Windows seems to be happy with my code, so I can't
> say what's wrong in these calculations...
>
> It does drag smooth now regardless of initial undocking or moving around
> afterwards. When initially undocking the mouse still goes to the area below
> the title bar though like if you drag out the tree pane the mouse is on
> first node in the tree when dragging the window.

Uhm, it looks like on the Mac something else is happening. I can't
reproduce this on Windows :-(

> Found one more that may affect all platforms.
> 1) In the demo drag the bottom sash so that the bottom pane is small
> 2) Drag out the tree pane and drag it towards the bottom pane till the auto
> notebook guide shows up
> 3) note that it below the window since there is not space for it to fit over
> the window (not a problem)
> 4) Drag the pane over that guide that is off the frame
> Traceback (most recent call last):
>   File "/Users/codyprecord/Desktop/devel/agw/agw/aui/framemanager.py", line
> 8882, in OnLeftUp
>     self.OnLeftUp_DragFloatingPane(event)
>   File "/Users/codyprecord/Desktop/devel/agw/agw/aui/framemanager.py", line
> 9382, in OnLeftUp_DragFloatingPane
>     self.Update()
>   File "/Users/codyprecord/Desktop/devel/agw/agw/aui/framemanager.py", line
> 6083, in Update
>     self.UpdateNotebook()
>   File "/Users/codyprecord/Desktop/devel/agw/agw/aui/framemanager.py", line
> 6291, in UpdateNotebook
>     raise Exception("Odd notebook docking")
> Exception: Odd notebook docking

This neither... I have tried with and without native miniframes,
extra-small, small or medium bottom pane sizes, to no avail. If you
can reproduce it on the Mac, could you please add these line:

print child_pane.IsOk(), notebook_pane.IsOk()

on line 6273 in framemanager.py? It's soooo hard to find out what's
wrong when I can't test what I am doing :-D

> I would say that it is not an element or trait you see in any other kind of
> traditional mac app but neither is it on windows the only app I can think of
> is Visual Studio. The docking art feels out of place with exception of the
> aero one is kind in the ballpark. I am not a purist by any means though by
> any means as long as something doesn't bring back memories of open motif
> widget based apps on aix it doesn't tend to be much of an issue to me. (oh
> the horror, writing that resulted in a brief flashback lol)

Good to know :-D

Cody Precord

unread,
Dec 18, 2009, 11:37:38 AM12/18/09
to wxpyth...@googlegroups.com
Hi,

On Fri, Dec 18, 2009 at 9:55 AM, Andrea Gavana <andrea...@gmail.com> wrote:
> Hi Cody,
>
> 2009/12/18 Cody Precord <codyp...@gmail.com>:
>> Hi,
>> On Dec 18, 2009, at 2:22 AM, Andrea Gavana wrote:
>
> Uhm, it looks like on the Mac something else is happening. I can't
> reproduce this on Windows :-(

I will try to take a closer look at it this weekend sometime.


>
> This neither... I have tried with and without native miniframes,
> extra-small, small or medium bottom pane sizes, to no avail. If you
> can reproduce it on the Mac, could you please add these line:
>
> print child_pane.IsOk(), notebook_pane.IsOk()
>
> on line 6273 in framemanager.py? It's soooo hard to find out what's
> wrong when I can't test what I am doing :-D

Will do when I get a chance.

As another note looking on my windows machine I now see a behavior
difference here. On Windows the new diamond shaped docking guide for
the autonotebook gets placed over (or replaces) the bottom docking
guide that was there before the pane got close. On wxMac the diamond
docking guide does not overlay the single one but instead is placed
below and to the left of it.


Cody

Andrea Gavana

unread,
Dec 18, 2009, 12:20:53 PM12/18/09
to wxpyth...@googlegroups.com
Hi Cody,

2009/12/18 Cody Precord:


> Hi,
>
> On Fri, Dec 18, 2009 at 9:55 AM, Andrea Gavana <andrea...@gmail.com> wrote:
>> Hi Cody,
>>
>> 2009/12/18 Cody Precord <codyp...@gmail.com>:
>>> Hi,
>>> On Dec 18, 2009, at 2:22 AM, Andrea Gavana wrote:
>>
>> Uhm, it looks like on the Mac something else is happening. I can't
>> reproduce this on Windows :-(
>
> I will try to take a closer look at it this weekend sometime.
>
>
>>
>> This neither... I have tried with and without native miniframes,
>> extra-small, small or medium bottom pane sizes, to no avail. If you
>> can reproduce it on the Mac, could you please add these line:
>>
>> print child_pane.IsOk(), notebook_pane.IsOk()
>>
>> on line 6273 in framemanager.py? It's soooo hard to find out what's
>> wrong when I can't test what I am doing :-D
>
> Will do when I get a chance.

I managed to reproduce this by detaching one page from the bottom
notebook, then shrink the pane and try to re-dock it. For some reason,
when you shrink the size of the pane, AUI seems to think that the
*floating* frame has 2 panes instead of 1, so it crashes because the
pane which has shrunk has no associated window. This is a tough one.


> As another note looking on my windows machine I now see a behavior
> difference here. On Windows the new diamond shaped docking guide for
> the autonotebook gets placed over (or replaces) the bottom docking
> guide that was there before the pane got close. On wxMac the diamond
> docking guide does not overlay the single one but instead is placed
> below and to the left of it.

Uhm, I am not sure I get the picture of this... would it be possible
for you to send a small screenshot of the Mac so that I can pass on my
poor English and understand the issue from a picture?

Reply all
Reply to author
Forward
0 new messages