[Chandler-dev] Fwd: [commits] (dan) [16094] a new recorded script

D John Anderson john at osafoundation.org
Tue Dec 11 11:51:31 PST 2007


On Dec 11, 2007, at 11:34 AM, Robin Dunn wrote:

> D John Anderson wrote:
>> On Dec 11, 2007, at 9:56 AM, Robin Dunn wrote:
>>> D John Anderson wrote:
>>>> Hi Dan:
>>>> This test is failing on the Tiger tinderboxes. It looks to me  
>>>> like a bug I fixed last week: OSX doesn't allow focus to be set  
>>>> to GenButtons.
>>>
>>> It should, and does in the wxPython demo.  Perhaps there is  
>>> something in the implementation of the derived classes in Chandler  
>>> that is affecting it?
>> That's interesting, Surprisingly, setting the focus to GenButtons  
>> works on non-OSX platforms, so it seems unlikely that it's  
>> implementation dependent, but I should look into it further. In  
>> wxPython demo, after you call SetFocus, do you verify that it  
>> actually got the focus by calling wx.Window.FindFocus?
>
> Yes, I did it via the pyshell in the widget inspector.  I used  
> wx.CallLater to call the button's SetFocus via a timer, and then  
> another wx.CallLater with a slightly longer timeout to call a  
> function that print's the results of the FindFocus.  I then switched  
> back to the demo window and waited for the timers to expire.

That make me suspect that the problem might be timing related. My test  
does a SetFocus, then verifies it, without any delay. If call to  
SetFocus didn't when verified, I call Yield, then test again, and  
that's the test that fails.


More information about the chandler-dev mailing list