Paul McNett wrote: > Paul McNett wrote: >> Paul McNett wrote: >>> Nate Lowrie wrote: >>>> On Thu, Jul 24, 2008 at 11:06 AM, Paul McNett <[EMAIL PROTECTED]> wrote: >>>>> No, it works fine on Gtk, but pressing Esc on Windows does some sort of >>>>> default action (it plays the bell sound) but it doesn't run our >>>>> _onEscapePressed() bindkey handler). >>>> Confirmed that it doesn't work. I did some testing and found that the >>>> event method isn't even firing... Could there be something wrong with >>>> bindKey? We had character capture problems on windows with the dShell >>>> i-search as well... >>> I got interrupted and haven't continued my debugging. One thing to do >>> would be to find the revision where it broke, and look at the diff. We >>> must be handling the escape key differently now. >> It is revision 4164, and I see that we used to set the cancel button's >> CancelButton property to True. However, trying this now results in >> dButton's _setCancelButton() to raise an exception because button.Form >> is evaluating to None instead of the dialog. >> >> But that code in dButton just does bindKey() which is what we are doing >> in dDialog, so it shouldn't matter/it should work. > > The buttons come from lower down than wxPython I think, and they aren't > passing the events up the containership. Doing the bindKey on each > button, as well as the dialog, appears to solve the issue. I'm testing.
That didn't work, unless I really wanted to add code to add the binding to every control added to the dialog. What was happening was we weren't setting dlg.SetEscapeId() correctly, although I still don't know exactly why our code wasn't working. [4317] and [4318] fix this on Windows, and don't appear to break anything on the other platforms. Paul _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev Searchable Archives: http://leafe.com/archives/search/dabo-dev This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]
