ComboCtrl problem on Mac with wxPython 3.0

Hi,

I am having problems with ComboCtrl with Tree popup under Mac (Maverick) with wxPython 3.0. The problem appears only when this widget is used in modal dialog. The popup opens but then I am not able to click on any tree item, as if blocked by the dialog. I believe it is working at least on Ubuntu. I attached code which shows the problem (but only on Mac with wxPython 3 of course).

Thank you,

Anna

test_combotree.py (6.84 KB)

I just realized there is already a ticket for this, although I am not sure
in which stage it is:
http://trac.wxwidgets.org/ticket/15383

I just started to test our application with wxPython 3.0 (cocoa) on Mac and
I was quite disappointed how many thing are broken or behave weird,
comparing to wxPython 3.0 on Ubuntu. Part of the problems are probably
caused by incorrect usage of the library, than by the wxPython library
itself (but it's hard to distinguish). Hopefully things get better.

cheers,
Anna

···

On Wed, Jun 25, 2014 at 6:10 PM, Anna Petrášová <kratochanna@gmail.com> wrote:

Hi,

I am having problems with ComboCtrl with Tree popup under Mac (Maverick)
with wxPython 3.0. The problem appears only when this widget is used in
modal dialog. The popup opens but then I am not able to click on any tree
item, as if blocked by the dialog. I believe it is working at least on
Ubuntu. I attached code which shows the problem (but only on Mac with
wxPython 3 of course).

Thank you,

Anna

Hi Anna,

...

I just started to test our application with wxPython 3.0 (cocoa) on Mac and I was quite disappointed how many thing are broken or behave weird, comparing to wxPython 3.0 on Ubuntu. Part of the problems are probably caused by incorrect usage of the library, than by the wxPython library itself (but it's hard to distinguish). Hopefully things get better.

Can you detail what these broken/weird things are?

Have you seen:
http://wiki.wxpython.org/Some%20General%20Cross%20Platform%20Guidelines
http://wiki.wxpython.org/RecipesCrossPlatform
http://wiki.wxpython.org/Optimizing%20for%20Mac%20OS%20X

Werner

···

On 6/26/2014 3:57, Anna Petrášová wrote:

Hi,

···

On Thu, Jun 26, 2014 at 3:12 AM, Werner wernerfbd@gmx.ch wrote:

Hi Anna,

On 6/26/2014 3:57, Anna Petrášová wrote:

I just started to test our application with wxPython 3.0 (cocoa) on Mac and I was quite disappointed how many thing are broken or behave weird, comparing to wxPython 3.0 on Ubuntu. Part of the problems are probably caused by incorrect usage of the library, than by the wxPython library itself (but it’s hard to distinguish). Hopefully things get better.

Can you detail what these broken/weird things are?

Have you seen:

http://wiki.wxpython.org/Some%20General%20Cross%20Platform%20Guidelines

http://wiki.wxpython.org/RecipesCrossPlatform

http://wiki.wxpython.org/Optimizing%20for%20Mac%20OS%20X

Werner

the links don’t seem very helpful in my case but thanks. I was trying to look at the problems and was able to workaround some of them but I have a few questions because I am not sure if the problem is a bug in wxWidgets or in my application. So for example, this short code demonstrate a problem with not respecting min size. I set the min size to (400, 400) but when the frame appears it is smaller. The solution is to set explicitly size (SetSize()) to the same value. I was not sure if this is a bug, but apparently yes (http://trac.wxwidgets.org/ticket/13628). Using SetMinSize should be enough, right?

import wx

class MyFrame(wx.Frame):

def init(

self, parent):

wx.Frame.init(self, parent)

panel = wx.Panel(self, -1)

sizer = wx.BoxSizer()

button = wx.Button(panel, 1003, “Close Me”)

sizer.Add(button)

panel.SetSizer(sizer)

self.SetMinSize((400, 400))

if name == ‘main’:

app = wx.App()

frame = MyFrame(None)

frame.Show()

app.MainLoop()

Then I had problems with toolbars described in http://trac.wxwidgets.org/ticket/13888. Another critical bug appears when using flatnotebook, there is already some discussion on mailing list but I don’t know if anything happened since then.

https://groups.google.com/forum/#!topic/wxpython-users/pYXJg4fCpQk

The most annoying problem I found is that hiding modal dialogs blocks the whole application. This is the case when I don’t understand if it is bug or feature, but I assume it’s a bug, otherwise programmer should be warned not to call Hide on modal dialog.

Currently I am not sure if I should try to workaround all these bugs which in some case would be pretty difficult or just wait. Unfortunately, the tickets I was looking at were not really active.

Best,

Anna

You received this message because you are subscribed to the Google Groups “wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Not that I'm aware of. It is definitely a bug in wxPython, not my usage of
it, and it is definitely new in 3.0. The wxWidgets event loop is a
complete black box to me (and I could not figure out a way to access it
from Python for debugging purposes), and I didn't have any luck with my
attempt to fix flatnotebook myself, so I eventually just gave up and added
a bunch of 3.0/Cocoa-specific tweaks to my app, like disabling the
tab-close box (or using the AGW notebook, which is approximately the same
layout).

-Nat

···

On Thu, Jun 26, 2014 at 12:47 PM, Anna Petrášová <kratochanna@gmail.com> wrote:

Another critical bug appears when using flatnotebook, there is already
some discussion on mailing list but I don't know if anything happened since
then.
Redirecting to Google Groups

Another critical bug appears when using flatnotebook, there is already
some discussion on mailing list but I don't know if anything happened since
then.
Redirecting to Google Groups

Not that I'm aware of. It is definitely a bug in wxPython, not my usage
of it, and it is definitely new in 3.0. The wxWidgets event loop is a
complete black box to me (and I could not figure out a way to access it
from Python for debugging purposes), and I didn't have any luck with my
attempt to fix flatnotebook myself, so I eventually just gave up and added
a bunch of 3.0/Cocoa-specific tweaks to my app, like disabling the
tab-close box (or using the AGW notebook, which is approximately the same
layout).

Is the bug reported somewhere? I didn't find it.

···

On Thu, Jun 26, 2014 at 3:57 PM, Nat Echols <nathaniel.echols@gmail.com> wrote:

On Thu, Jun 26, 2014 at 12:47 PM, Anna Petrášová <kratochanna@gmail.com> > wrote:

-Nat

--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No, Robin Dunn advised me that the wxWidgets maintainers probably wouldn't
be interested in a bug that only appears in wxPython, so I didn't bother
filing a ticket - although since the same identical code worked in 2.9.5, I
suspect that it's ultimately a problem in wxWidgets itself.

-Nat

···

On Thu, Jun 26, 2014 at 1:03 PM, Anna Petrášová <kratochanna@gmail.com> wrote:

Is the bug reported somewhere? I didn't find it.

Is the bug reported somewhere? I didn't find it.

No, Robin Dunn advised me that the wxWidgets maintainers probably wouldn't
be interested in a bug that only appears in wxPython, so I didn't bother
filing a ticket - although since the same identical code worked in 2.9.5, I
suspect that it's ultimately a problem in wxWidgets itself.

I think it's worth creating a ticket, especially when we don't know where
the bug is. Will you create it? I can do it too, but you seems to know more
about it.

Anna

···

On Thu, Jun 26, 2014 at 4:35 PM, Nat Echols <nathaniel.echols@gmail.com> wrote:

On Thu, Jun 26, 2014 at 1:03 PM, Anna Petrášová <kratochanna@gmail.com> > wrote:

-Nat

--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Will do - I already have a nice compact code sample that will reproduces
the problem.

-Nat

···

On Thu, Jun 26, 2014 at 1:44 PM, Anna Petrášová <kratochanna@gmail.com> wrote:

I think it's worth creating a ticket, especially when we don't know where
the bug is. Will you create it? I can do it too, but you seems to know more
about it.

I think it's worth creating a ticket, especially when we don't know where
the bug is. Will you create it? I can do it too, but you seems to know more
about it.

Will do - I already have a nice compact code sample that will reproduces
the problem.

Thanks!

···

On Thu, Jun 26, 2014 at 4:47 PM, Nat Echols <nathaniel.echols@gmail.com> wrote:

On Thu, Jun 26, 2014 at 1:44 PM, Anna Petrášová <kratochanna@gmail.com> > wrote:

-Nat

--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

It may take a while for this to happen - I just tried submitting a ticket and got “Internal Server Error”, with “[no address given]” in place of the admin contact. Does anyone know who I could contact that would be able to fix their server? I did not see any contact info elsewhere on the site (or any indication that they’re aware of the problem).

-Nat

···

On Thu, Jun 26, 2014 at 1:50 PM, Anna Petrášová kratochanna@gmail.com wrote:

You received this message because you are subscribed to the Google Groups “wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

On Thu, Jun 26, 2014 at 4:47 PM, Nat Echols nathaniel.echols@gmail.com wrote:

On Thu, Jun 26, 2014 at 1:44 PM, Anna Petrášová kratochanna@gmail.com wrote:

Thanks!

You received this message because you are subscribed to the Google Groups “wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

I think it’s worth creating a ticket, especially when we don’t know where the bug is. Will you create it? I can do it too, but you seems to know more about it.

Will do - I already have a nice compact code sample that will reproduces the problem.

-Nat

Correction: I meant the AUI notebook.

-Nat

···

On Thu, Jun 26, 2014 at 12:57 PM, Nat Echols <nathaniel.echols@gmail.com> wrote:

using the AGW notebook, which is approximately the same layout).

Seems like the same error as here:
https://groups.google.com/forum/#!topic/wxpython-users/ZE_xSGwx-QM

Why not just create the frame after the mainloop starts?

···

On Wednesday, June 25, 2014 3:10:51 PM UTC-7, annakrat wrote:

Hi,

I am having problems with ComboCtrl with Tree popup under Mac (Maverick) with wxPython 3.0. The problem appears only when this widget is used in modal dialog. The popup opens but then I am not able to click on any tree item, as if blocked by the dialog. I believe it is working at least on Ubuntu. I attached code which shows the problem (but only on Mac with wxPython 3 of course).

Thank you,

Anna

Seems like the same error as here:
Redirecting to Google Groups

Why not just create the frame after the mainloop starts?

Hm, I don't see any similarity, my problem appears in already running
application

Anna

···

On Thu, Jun 26, 2014 at 6:18 PM, Nathan McCorkle <nmz787@gmail.com> wrote:

On Wednesday, June 25, 2014 3:10:51 PM UTC-7, annakrat wrote:

Hi,

I am having problems with ComboCtrl with Tree popup under Mac (Maverick)
with wxPython 3.0. The problem appears only when this widget is used in
modal dialog. The popup opens but then I am not able to click on any tree
item, as if blocked by the dialog. I believe it is working at least on
Ubuntu. I attached code which shows the problem (but only on Mac with
wxPython 3 of course).

Thank you,

Anna

--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Nat,

···

On 6/26/2014 23:11, Nat Echols wrote:

It may take a while for this to happen - I just tried submitting a ticket and got "Internal Server Error", with "[no address given]" in place of the admin contact. Does anyone know who I could contact that would be able to fix their server? I did not see any contact info elsewhere on the site (or any indication that they're aware of the problem).

IIRC the wxWidgets trac is on a server Robin maintains, maybe shot him a email and/or a mail to wx-dev@googlegroups.com

Werner

Hi,

...

Then I had problems with toolbars described in wxTrac has been migrated to GitHub Issues - wxWidgets.

It looks like it has gone of the radar of 'csomor' who I believe is the maintainer of the mac port. Maybe add a comment to the ticket that you run into this problem in wxPython 3.0.

Is this still happening in 3.0.1 - an oldish preview exists here: http://wxpython.kosoftworks.com/preview/20140104/

Have you tried it with wxPython Phoenix?

Werner

···

On 6/26/2014 21:47, Anna Petrášová wrote:

Hi,

...

Then I had problems with toolbars described in http://trac.wxwidgets.org/

ticket/13888.

It looks like it has gone of the radar of 'csomor' who I believe is the
maintainer of the mac port. Maybe add a comment to the ticket that you run
into this problem in wxPython 3.0.

I'll do that.

Is this still happening in 3.0.1 - an oldish preview exists here:
http://wxpython.kosoftworks.com/preview/20140104/

I don't have now a simple way to test it, so maybe later.

Have you tried it with wxPython Phoenix?

Not yet, the problem is that the application relies heavily on wx.PseudoDC
which still seems to be missing in Phoenix. Do you know if the plan is to
have it in Phoenix or it will never get there? In that case I have to start
thing what to use instead.

Thanks, Anna

···

On Fri, Jun 27, 2014 at 2:35 AM, Werner <wernerfbd@gmx.ch> wrote:

On 6/26/2014 21:47, Anna Petrášová wrote:

Werner

--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Sorry no idea what the plans are for PseudoDC.
Werner

···

Hi,

  On 6/27/2014 15:31, Anna Petrášová wrote:

Have you tried it with wxPython Phoenix?

          Not yet, the problem is that the application relies

heavily on wx.PseudoDC which still seems to be missing in
Phoenix. Do you know if the plan is to have it in Phoenix
or it will never get there? In that case I have to start
thing what to use instead.

Ahh, I got confused and thought creating Frames before calling MainLoop was the problem! Sorry, I was confused!

I tried your test code here on Win7 with wx 2.9.4 and 3.0… I can see some tree menu items in the popup, but nothing seems to happen when I click OK or Cancel. Not sure if that’s intended or not.

Just for fun I changed:

if wx.Platform != “WXMSW”:

to:

if True:

and the help button on the popup seems to work for me to see the helptext, so that at least seems unneeded (unless again, this is desired).

Anyway, as a workaround could you do something like wx.Freeze() then call your popup but not as a modal… my thought is the Freeze on the parent will disallow click events there, but allow them for your popup. On returning, you’d call wx.Thaw()… or something like that.

···

Ahh, I got confused and thought creating Frames before calling MainLoop
was the problem! Sorry, I was confused!

I tried your test code here on Win7 with wx 2.9.4 and 3.0... I can see
some tree menu items in the popup, but nothing seems to happen when I click
OK or Cancel. Not sure if that's intended or not.

I can see the items in the popup but when I try to click on any item,
nothing happens except for the sound which the computer does whenever I try
to click on a window blocked by a modal dialog. The popup just hangs there
until I click somewhere else than on the popup. So I can't select any item.

Just for fun I changed:
if wx.Platform != "__WXMSW__":

to:
if True:

and the help button on the popup seems to work for me to see the helptext,
so that at least seems unneeded (unless again, this is desired).

Anyway, as a workaround could you do something like wx.Freeze() then call
your popup but not as a modal.. my thought is the Freeze on the parent will
disallow click events there, but allow them for your popup. On returning,
you'd call wx.Thaw().... or something like that.

wx.Freeze didn't do anything, although I am not sure if I used it

correctly. This problem appears only when the parent of the combo is modal.

Thanks, Anna

···

On Fri, Jun 27, 2014 at 4:43 PM, Nathan McCorkle <nmz787@gmail.com> wrote:

  --
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.