ANN: PyAUI Updates

Sorry, I wouldn't call it "nice" yet...

Welcome to the world of cross-platform applications :wink:

I don't see an X at all, there are only those red bubbles as on every
mini window.
And the mouse interaction is very strange indeed.

Would you mind sending a screenshot? I don't have a Mac, so I can't
reproduce the problem and I can't think of anything that could cause such
behaviour... you could send me privately, if you wish, at:

andrea_gavana@tin.it

I see the handles of bars or the custom title bars only for a short
moment while I start dragging something.

Same comments as above... it's quite complicated to fix something that I
can't reproduce :slight_smile:

Andrea.

···

_______________________________________________
Andrea Gavana
Reservoir Engineer
MOGI ? Reservoir Characterization and Modeling Dept.
ENI S.p.A. ? Exploration & Production Division
Via Emilia, 1 ? 20097 San Donato Milanese (MI) ? Italy
Phone: +39 02 520 62972
Fax: +39 02 520 61824
E-mail: andrea.gavana@agip.it
Restyled Internet Site: http://xoomer.virgilio.it/infinity77/
____________________________________________________

Eni S.p.A.
Sede legale in Roma,
Piazzale Enrico Mattei 1, 00144 Roma
Tel. centralino: +39 06598.21
www.eni.it
Capitale sociale € 4.002.934.326 i.v.
Registro Imprese di Roma,
Codice Fiscale 00484960588
Part. IVA 00905811006
R.E.A. Roma n. 756453

Hi Andrea,

I also couldnt resist to try it out on the Mac. When moving a panel
you get the same traceback:
Traceback (most recent call last):
  File "/Users/stani/Desktop/PyAUI/PyAUI.py", line 1572, in OnIdle
    self.OnMoveFinished()
  File "/Users/stani/Desktop/PyAUI/PyAUI.py", line 1594, in OnMoveFinished
    self._owner_mgr.OnFloatingPaneMoved(self._pane_window)
  File "/Users/stani/Desktop/PyAUI/PyAUI.py", line 4103, in OnFloatingPaneMoved
    if wx.GetKeyState(wx.WXK_CONTROL):
  File "//Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/wx-2.6-mac-ansi/wx/_misc.py",
line 604, in GetKeyState
    return _misc_.GetKeyState(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "bOK" failed in
../src/mac/corefoundation/hid.cpp(552)

I think this error might be responsible for everything. This is what
is not working on Mac:
- it doesn't undock
- when I move over a toolbar so that the cursor changes in the axes
and I hold down the left mouse button, nothing happens until I release
the mouse button. Then the the toolbar moves with the mouse. I can fix
the position of the toolbar by a single left down.

As it can't retrieve correctly the key state, I guess the
functionality is hindered.

What I strongly miss is feedback where the pane will be undocked. I
think for an average end user it is not always clear if a pane will be
undocked horizontally or vertically. What I propose is that you draw a
simple rectangular outline of the pane if it would be undocked at that
moment.

It would be very cool if this would work, so good luck!

Stani

PS If you want screenshots, let me know.

···

On 1/18/06, andrea.gavana@agip.it <andrea.gavana@agip.it> wrote:

> Sorry, I wouldn't call it "nice" yet...

Welcome to the world of cross-platform applications :wink:

>I don't see an X at all, there are only those red bubbles as on every
>mini window.
>And the mouse interaction is very strange indeed.

Would you mind sending a screenshot? I don't have a Mac, so I can't
reproduce the problem and I can't think of anything that could cause such
behaviour... you could send me privately, if you wish, at:

andrea_gavana@tin.it

>I see the handles of bars or the custom title bars only for a short
>moment while I start dragging something.

Same comments as above... it's quite complicated to fix something that I
can't reproduce :slight_smile:

Andrea.

_______________________________________________
Andrea Gavana
Reservoir Engineer
MOGI ? Reservoir Characterization and Modeling Dept.
ENI S.p.A. ? Exploration & Production Division
Via Emilia, 1 ? 20097 San Donato Milanese (MI) ? Italy
Phone: +39 02 520 62972
Fax: +39 02 520 61824
E-mail: andrea.gavana@agip.it
Restyled Internet Site: http://xoomer.virgilio.it/infinity77/
____________________________________________________

Eni S.p.A.
Sede legale in Roma,
Piazzale Enrico Mattei 1, 00144 Roma
Tel. centralino: +39 06598.21
www.eni.it
Capitale sociale € 4.002.934.326 i.v.
Registro Imprese di Roma,
Codice Fiscale 00484960588
Part. IVA 00905811006
R.E.A. Roma n. 756453

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

--

http://pythonide.stani.be/screenshots
http://pythonide.stani.be/manual/html/manual.html

Hello Stani,

I also couldnt resist to try it out on the Mac. When moving a panel
you get the same traceback:

I am glad you have tried it on Mac :wink:

<snip>

if wx.GetKeyState(wx.WXK_CONTROL):
File

"//Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packa
ges/wx-2.6-mac-ansi/wx/_misc.py",

line 604, in GetKeyState
    return _misc_.GetKeyState(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "bOK" failed in
../src/mac/corefoundation/hid.cpp(552)

Mhm... it seems that Mac is failing with wx.GetKeyState(). Robin, is
wx.GetKeyState() supposed to work also on Mac? I thought it was... or is it
wrong the way I call it:

if wx.GetKeyState(wx.WXK_CONTROL):

To check if the Ctrl key is down?

I think this error might be responsible for everything. This is what
is not working on Mac:
- it doesn't undock

Mhm, Henning has reported a different behaviour. If I have correctly
understood his private email, undocking works (with some Refresh() problem
though).

- when I move over a toolbar so that the cursor changes in the axes
and I hold down the left mouse button, nothing happens until I release
the mouse button. Then the the toolbar moves with the mouse. I can fix
the position of the toolbar by a single left down.

Yes, Henning has reported the same problem. It seems that the new wxPython
method wx.GetMouseState() is not doing the right thing, or, more probably,
there are incompatibilities between Mac and Windows/Linux behaviours (it
seems that Mac does not receive the LeftUp) or, most probable, I am doing
something silly in the code (though it's working both on Windows and Linux).

What I strongly miss is feedback where the pane will be undocked. I
think for an average end user it is not always clear if a pane will be
undocked horizontally or vertically. What I propose is that you draw a
simple rectangular outline of the pane if it would be undocked at that
moment.

Well, the pane will be undocked exactly at your mouse position (on Windows
and Linux). If you click a caption and you drag, the pane is "inserted" in a
floating frame and undocked. Or did you mean *docked* (repositioned the
panel inside the frame)?
Because I don't understand what "for an average end user it is not always
clear if a pane will be undocked horizontally or vertically" means... how
could you undock something vertically or horizontally? If you meant
*docked*, there is a rectangular hint (on Windows and Linux) that shows you
where the panel will be docked inside the main frame.
Probably I have missed your point here... could you please clarify?

Thank you very much for your feedback.

Andrea.

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

Hello Stani,

> I also couldnt resist to try it out on the Mac. When moving a panel
> you get the same traceback:

I am glad you have tried it on Mac :wink:

<snip>
> if wx.GetKeyState(wx.WXK_CONTROL):
> File
"//Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packa
ges/wx-2.6-mac-ansi/wx/_misc.py",
> line 604, in GetKeyState
> return _misc_.GetKeyState(*args, **kwargs)
> wx._core.PyAssertionError: C++ assertion "bOK" failed in
> ../src/mac/corefoundation/hid.cpp(552)

Mhm... it seems that Mac is failing with wx.GetKeyState(). Robin, is
wx.GetKeyState() supposed to work also on Mac? I thought it was... or is it
wrong the way I call it:

if wx.GetKeyState(wx.WXK_CONTROL):

To check if the Ctrl key is down?

> I think this error might be responsible for everything. This is what
> is not working on Mac:
> - it doesn't undock

Mhm, Henning has reported a different behaviour. If I have correctly
understood his private email, undocking works (with some Refresh() problem
though).

Sorry for my english, I think in my previous mail you can swap 'dock'
and 'undock'. I can drag out but not drop it in again, if that makes
more sense.

> - when I move over a toolbar so that the cursor changes in the axes
> and I hold down the left mouse button, nothing happens until I release
> the mouse button. Then the the toolbar moves with the mouse. I can fix
> the position of the toolbar by a single left down.

Yes, Henning has reported the same problem. It seems that the new wxPython
method wx.GetMouseState() is not doing the right thing, or, more probably,
there are incompatibilities between Mac and Windows/Linux behaviours (it
seems that Mac does not receive the LeftUp) or, most probable, I am doing
something silly in the code (though it's working both on Windows and Linux).

I hope it is possible to solve it by tweaking your code, otherwise
we'll have to wait for wxPython 2.7 ;-( (Hmm, one SPE user is already
using wxPython 2.7.0.0.pre I wonder how this is possible.)

> What I strongly miss is feedback where the pane will be undocked. I
> think for an average end user it is not always clear if a pane will be
> undocked horizontally or vertically. What I propose is that you draw a
> simple rectangular outline of the pane if it would be undocked at that
> moment.

Well, the pane will be undocked exactly at your mouse position (on Windows
and Linux). If you click a caption and you drag, the pane is "inserted" in a
floating frame and undocked. Or did you mean *docked* (repositioned the
panel inside the frame)?
Because I don't understand what "for an average end user it is not always
clear if a pane will be undocked horizontally or vertically" means... how
could you undock something vertically or horizontally? If you meant
*docked*, there is a rectangular hint (on Windows and Linux) that shows you
where the panel will be docked inside the main frame.

Really? I don't see any rectangular hint on Windows and just downloaded it.

Probably I have missed your point here... could you please clarify?

If the hint would be visible probably it would be clearer. Even for me
it is not always clear when it will dock (insert, missing the
rectangular hint), but undocking (remove) is. Can you describe exactly
when pyAUI decides to dock?

Thank you very much for your feedback.

This becomes a classic: no, thank you!

Stani

···

On 1/18/06, Andrea Gavana <andrea_gavana@tin.it> wrote:

--

http://pythonide.stani.be/screenshots
http://pythonide.stani.be/manual/html/manual.html

Another comment on Mac:
The floating toolbars are resizable. I think they shouldn't be, like on Windows.
Stani

> Hello Stani,
>
> > I also couldnt resist to try it out on the Mac. When moving a panel
> > you get the same traceback:
>
> I am glad you have tried it on Mac :wink:
>
> <snip>
> > if wx.GetKeyState(wx.WXK_CONTROL):
> > File
> "//Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packa
> ges/wx-2.6-mac-ansi/wx/_misc.py",
> > line 604, in GetKeyState
> > return _misc_.GetKeyState(*args, **kwargs)
> > wx._core.PyAssertionError: C++ assertion "bOK" failed in
> > ../src/mac/corefoundation/hid.cpp(552)
>
> Mhm... it seems that Mac is failing with wx.GetKeyState(). Robin, is
> wx.GetKeyState() supposed to work also on Mac? I thought it was... or is it
> wrong the way I call it:
>
> if wx.GetKeyState(wx.WXK_CONTROL):
>
> To check if the Ctrl key is down?
>
> > I think this error might be responsible for everything. This is what
> > is not working on Mac:
> > - it doesn't undock
>
> Mhm, Henning has reported a different behaviour. If I have correctly
> understood his private email, undocking works (with some Refresh() problem
> though).
Sorry for my english, I think in my previous mail you can swap 'dock'
and 'undock'. I can drag out but not drop it in again, if that makes
more sense.
>
> > - when I move over a toolbar so that the cursor changes in the axes
> > and I hold down the left mouse button, nothing happens until I release
> > the mouse button. Then the the toolbar moves with the mouse. I can fix
> > the position of the toolbar by a single left down.
>
> Yes, Henning has reported the same problem. It seems that the new wxPython
> method wx.GetMouseState() is not doing the right thing, or, more probably,
> there are incompatibilities between Mac and Windows/Linux behaviours (it
> seems that Mac does not receive the LeftUp) or, most probable, I am doing
> something silly in the code (though it's working both on Windows and Linux).
I hope it is possible to solve it by tweaking your code, otherwise
we'll have to wait for wxPython 2.7 ;-( (Hmm, one SPE user is already
using wxPython 2.7.0.0.pre I wonder how this is possible.)

As in my other mail, this is fixed (for me) by removing an extra
event.Skip(), but I don't get the traceback you do even with it. I'm
using MacPython 2.4 (from Python Stuff) and the Robins
2.6.2.1 pre-release from 01/06.

>
> > What I strongly miss is feedback where the pane will be undocked. I
> > think for an average end user it is not always clear if a pane will be
> > undocked horizontally or vertically. What I propose is that you draw a
> > simple rectangular outline of the pane if it would be undocked at that
> > moment.
>
> Well, the pane will be undocked exactly at your mouse position (on Windows
> and Linux). If you click a caption and you drag, the pane is "inserted" in a
> floating frame and undocked. Or did you mean *docked* (repositioned the
> panel inside the frame)?
> Because I don't understand what "for an average end user it is not always
> clear if a pane will be undocked horizontally or vertically" means... how
> could you undock something vertically or horizontally? If you meant
> *docked*, there is a rectangular hint (on Windows and Linux) that shows you
> where the panel will be docked inside the main frame.
Really? I don't see any rectangular hint on Windows and just downloaded it.

If you're on Windows 2000 or XP, it's the pretty blue translucent
area. If you're not it's a ugly sort of bold rectangular line.

On the Mac, the hint is drawn but the drawing is funky and the color
is bad so it can be hard to see.

> Probably I have missed your point here... could you please clarify?
If the hint would be visible probably it would be clearer. Even for me
it is not always clear when it will dock (insert, missing the
rectangular hint), but undocking (remove) is. Can you describe exactly
when pyAUI decides to dock?

When docking into the main window, it's docked when you're over the
"chrome" part of the frame - the title bar or the border region. That
area is a lot smaller on the Mac so it's a little harder to hit it. It
will also dock into/around a child area any time you're over the
child.

···

On 1/18/06, SPE Stani's Python Editor <spe.stani.be@gmail.com> wrote:

On 1/18/06, Andrea Gavana <andrea_gavana@tin.it> wrote:

> Thank you very much for your feedback.
This becomes a classic: no, thank you!

Stani

--
http://pythonide.stani.be
http://pythonide.stani.be/screenshots
http://pythonide.stani.be/manual/html/manual.html

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Hello Chris & NG,

Mhm, do you think that calling FloatingFrame.Refresh() *after* having

drawn

the hint would do the job? Does this mean that you are seeing the "hint"
when you are about to dock a floating frame? So there is a different
behavior between your Mac and Stani's Mac :wink:

I'm not sure - the screen DC is trying to clip that region and it's
obviously not working but I'm not sure why. I don't like that code
path anyway, I'm going to try to implement a nice transparent region
instead.

That would be the best also in my opinion. I don't like that part of the
code either, but it was much more easy to just translate the C++ code
instead of inventing something... probably I should have thought about that.
If you implement that modification, will you share it/provide a patch?

The other issue with the frame captions and such not always being
refreshed I'm working around with some brute-force hacks and delayed
painting.

Could you please tell me which kind of brute-force hack are you using? On
Windows and Linux I simply call:

wx.CallAfter(FloatingFrame.Refresh)

In order to refresh also the frame captions... but on Linux it doesn't work
very well.

The XOR hint when you resize a docked frame. I believe it may be
another clipping issue.
The docked frame is resized correctly, but there is no feedback that
it's happening.

Also this one is strange... on Windows and Linux there is a visual feedback.
I will investigate more about this by looking at the code, but obviously I
can't test it here (no Mac) :frowning:

As an aside, using wxRenderer to render the resize sash would be nice
- I'll implement that unless you want to.

This is an excellent idea... I haven't even thought about wx.Renderer,
probably because I have never used before :wink:
If you can implement it (an you can share it) I will patch PyAUI.py. If not
(or you don't have time) I'll try to do it myself.

I also have thought about this, but I have no idea on how to do it on
non-Windows platforms (and also on Windows platforms that don't have
win32all installed)... if you have any suggestion, I will be very happy

to

implement it.

The same basic way as wxMSW should work (pretty transparent floating
window), but I'll have to investigate how to do it on the Mac.

The transparent floating windows and transparent docking hints are created
with the help of win32all extensions, they are not the results of a wxPython
command. Probably it's possible to implement the transparent floating hints
by using some wxPython code, but I still haven't figured out how to do it
:frowning:

Thank you very much for yur efforts!

Andrea.

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

Hello Stani & NG,

There is nothing about Mac, because the original developers didn’t think

about Mac :frowning:
That’s a pitty!

In any case, I will do all my best to support also this platform, I hate to
have things that are “half-cross-platform”.
Great!

The other issues you are seeing
(resizable toolbar) may be due to the fact that I am using a wx.MiniFrame
(like on Windows) instead of a wx.Frame (on Linux) to have floating frames.
Why use wx.Frames on Linux? I’d prefer mini frames.

Or may be due to something else.
It is quite simple. There is no distinction between the toolbar frame and a normal frame, which are defined by:
class FloatingPane(FloatingPaneBaseClass):

def __init__(self, parent, owner_mgr, id=wx.ID_ANY, title="", pos=wx.DefaultPosition,

size=wx.DefaultSize, style=wx.RESIZE_BORDER | wx.SYSTEM_MENU |
wx.CAPTION |

wx.CLOSE_BOX | wx.FRAME_NO_TASKBAR |

wx.FRAME_FLOAT_ON_PARENT | wx.CLIP_CHILDREN):

If for the toolbar you would leave out the wx.RESIZE_BORDER it works fine.

(Hmm, one SPE user is already
using wxPython 2.7.0.0.pre I wonder how this is possible.)

Wow, you have a user that is faster than Robin in updating wxPython :wink:

Though it’s about impossible to have wxPython 2.7.0.0, noting that there is
no wxWidgets 2.7 :wink:
It is not a joke, he sent a bug report in which SPE puts the following automatically:

Spe is running in debugging mode with this configuration:

  • platform : linux2

  • python : 2.4.2

  • wxPython : 2.7.0.0.pre

  • interface :

  • encoding : utf
    I think it is possible, if he compiles from cvs.

If you meant
docked, there is a rectangular hint (on Windows and Linux) that shows
you
where the panel will be docked inside the main frame.
Really? I don’t see any rectangular hint on Windows and just downloaded it.

Mhm, could you please look at this screenshot:

http://xoomer.virgilio.it/infinity77/eng/software/images/pyaui3.jpg

Don’t you see the blue hint even on Windows? Mhm, quite strange… are you
using wxPython 2.6.2.1?

Sorry, I use the silver theme, and indeed I see a light gray feedback
:wink: But maybe I would have prefered a thin black line around the
transparent area. It is quite subtle, but that’s just my opinion.

Stani

···

On 1/19/06, Andrea Gavana andrea_gavana@tin.it wrote:


http://pythonide.stani.be
http://pythonide.stani.be/screenshots

http://pythonide.stani.be/manual/html/manual.html

A lot of apps aren't really compatible with VNC - e.g. everything build on OpenStep will never refresh its GUI unless you "wipe" over it with your mouse. Other GUI toolkits behave the same.
It's no wonder that you can't see the "hint frame" for dropping.

While administrating Mac from a Windows machine via VNC I got really annoyed by not being able to use a lot of keys. Maybe there would be a solution, but I didnÄt find it. And now I don't need it anymore...

Greetlings from Lake Constance!
Hraban

···

Am 2006-01-19 um 01:44 schrieb SPE Stani's Python Editor:

And yes, there obviously is some difference between me and Stani. I
don't know what it is, though :frowning:

Maybe because he's using a screen switch?
I experienced sometimes strange behaviour with computers behind such
switches.
(VNC or some other terminal server would be much worse, though.)

In order to save desktop space and to be able to copy paste between
the two machines I use VNC. My Mac has Tiger (MacOS X 10.4),
ActivePython 2.4 and Robins wxPython 2.6 I do get the traceback and it
might be related to VNC as VNC can not send Ctrl keys through
normally.

So if nobody else gets this problem, then it is false alarm and only
means that your application is not compatible with VNC, which at this
moment should be the last of your concerns. You could try to follow
Robin suggestions and then I'll let you know if I still get them.

---
http://www.fiee.net
http://www.cacert.org (I'm an assurer)