I am trying out the 64-bit cocoa build of wxPython. Two problems I
have noticed so far.
wxTextCtrls-
There is some sort of freezing going on where the TextCtrl starts out
as selected and stays selected, resulting in inconsistencies. I
realize that sounds vague, so here's an example. I have a basic
TextCtrl verifier that checks if the TextCtrl is empty, and if it is,
makes the BackgroundColour red. This worked fine using carbon.
However, under cocoa, the TextCtrl stays selected WHEN I press the
submit, and doesn't update the background until I have selected
another element in the UI, specifically another TC. I'm not sure if
this is part of cocoa, or if it is a bug with wxPython, or what.
wxSliders-
Pretty easy. Setting the width with wx.Size doesn't seem to affect
wxSliders. wx.EXPAND works, but setting the width doesn't.
If you have any debugging or workaround tips, that would be great.
Also, tell me if you would like me to submit this as a bug report
instead.
The first step would be to make a runnable, small as possible, sample application that demonstrates the problem. MakingSampleApps - wxPyWiki
···
On 9/10/11 1:24 PM, Daniel Fontaine wrote:
I am trying out the 64-bit cocoa build of wxPython. Two problems I
have noticed so far.
wxTextCtrls-
There is some sort of freezing going on where the TextCtrl starts out
as selected and stays selected, resulting in inconsistencies. I
realize that sounds vague, so here's an example. I have a basic
TextCtrl verifier that checks if the TextCtrl is empty, and if it is,
makes the BackgroundColour red. This worked fine using carbon.
However, under cocoa, the TextCtrl stays selected WHEN I press the
submit, and doesn't update the background until I have selected
another element in the UI, specifically another TC. I'm not sure if
this is part of cocoa, or if it is a bug with wxPython, or what.
wxSliders-
Pretty easy. Setting the width with wx.Size doesn't seem to affect
wxSliders. wx.EXPAND works, but setting the width doesn't.
If you have any debugging or workaround tips, that would be great.
Also, tell me if you would like me to submit this as a bug report
instead.
I am trying out the 64-bit cocoa build of wxPython. Two problems I
have noticed so far.
wxTextCtrls-
There is some sort of freezing going on where the TextCtrl starts out
as selected and stays selected, resulting in inconsistencies. I
realize that sounds vague, so here's an example. I have a basic
TextCtrl verifier that checks if the TextCtrl is empty, and if it is,
makes the BackgroundColour red. This worked fine using carbon.
However, under cocoa, the TextCtrl stays selected WHEN I press the
submit, and doesn't update the background until I have selected
another element in the UI, specifically another TC. I'm not sure if
this is part of cocoa, or if it is a bug with wxPython, or what.
I'm not experiencing this problem with your sample... Do you have "Full Keyboard Access" turned on for all controls in System Preferences? If not then none of the other controls in your sample will actually be able to get the focus because apparently Apple thinks that having controls that can only be interacted with using the mouse is a good idea.
wxSliders-
Pretty easy. Setting the width with wx.Size doesn't seem to affect
wxSliders. wx.EXPAND works, but setting the width doesn't.
Looks like there is a missing call to SetMinSize using the size passed to the constructor. You can work around it by calling it yourself:
I am trying out the 64-bit cocoa build of wxPython. Two problems I
have noticed so far.
wxTextCtrls-
There is some sort of freezing going on where the TextCtrl starts out
as selected and stays selected, resulting in inconsistencies. I
realize that sounds vague, so here's an example. I have a basic
TextCtrl verifier that checks if the TextCtrl is empty, and if it is,
makes the BackgroundColour red. This worked fine using carbon.
However, under cocoa, the TextCtrl stays selected WHEN I press the
submit, and doesn't update the background until I have selected
another element in the UI, specifically another TC. I'm not sure if
this is part of cocoa, or if it is a bug with wxPython, or what.
I'm not experiencing this problem with your sample... Do you have "Full Keyboard Access" turned on for all controls in System Preferences? If not then none of the other controls in your sample will actually be able to get the focus because apparently Apple thinks that having controls that can only be interacted with using the mouse is a good idea.
Here is what I see after clicking on the "red" button. Notice that the focus ring is on the button, not the textctrl. It appears in your screen snaps that the focus is not moving to the button, which is why I thought that "Full Keyboard Access" is sot set to "All Controls"... Which version of OSX are you running?
I am trying out the 64-bit cocoa build of wxPython. Two problems I
have noticed so far.
wxTextCtrls-
There is some sort of freezing going on where the TextCtrl starts out
as selected and stays selected, resulting in inconsistencies. I
realize that sounds vague, so here's an example. I have a basic
TextCtrl verifier that checks if the TextCtrl is empty, and if it is,
makes the BackgroundColour red. This worked fine using carbon.
However, under cocoa, the TextCtrl stays selected WHEN I press the
submit, and doesn't update the background until I have selected
another element in the UI, specifically another TC. I'm not sure if
this is part of cocoa, or if it is a bug with wxPython, or what.
I'm not experiencing this problem with your sample... Do you have "Full Keyboard Access" turned on for all controls in System Preferences? If not then none of the other controls in your sample will actually be able to get the focus because apparently Apple thinks that having controls that can only be interacted with using the mouse is a good idea.
Yes, I have it turned on and still have the problem.
I've attached a graphic which (hopefully) is able to better explain my problem.
I'm using Mac OSX 10.6.8
You're spot on with you're diagnosis. The focus isn't shifting to the button. Don't know why though.
···
On Sep 13, 2011, at 8:15 PM, Robin Dunn wrote:
On 9/12/11 11:08 AM, Daniel Fontaine wrote:
On 9/10/11 1:24 PM, Daniel Fontaine wrote:
I am trying out the 64-bit cocoa build of wxPython. Two problems I
have noticed so far.
wxTextCtrls-
There is some sort of freezing going on where the TextCtrl starts out
as selected and stays selected, resulting in inconsistencies. I
realize that sounds vague, so here's an example. I have a basic
TextCtrl verifier that checks if the TextCtrl is empty, and if it is,
makes the BackgroundColour red. This worked fine using carbon.
However, under cocoa, the TextCtrl stays selected WHEN I press the
submit, and doesn't update the background until I have selected
another element in the UI, specifically another TC. I'm not sure if
this is part of cocoa, or if it is a bug with wxPython, or what.
I'm not experiencing this problem with your sample... Do you have "Full Keyboard Access" turned on for all controls in System Preferences? If not then none of the other controls in your sample will actually be able to get the focus because apparently Apple thinks that having controls that can only be interacted with using the mouse is a good idea.
Yes, I have it turned on and still have the problem.
I've attached a graphic which (hopefully) is able to better explain my problem.
Here is what I see after clicking on the "red" button. Notice that the focus ring is on the button, not the textctrl. It appears in your screen snaps that the focus is not moving to the button, which is why I thought that "Full Keyboard Access" is sot set to "All Controls"... Which version of OSX are you running?