On Mon, Nov 21, 2011 at 9:39 AM, Terry Brown <[email protected]> wrote:
> Somewhere in a recent thread Edward announced top level key handling so
> Leo's keys have their default behavior in *all* windows which don't
> provide specific overrides.  This is fantastic - now you can move
> around the tree with keys, doing things to nodes by clicking in plugin
> windows without having to click back to a core Leo window to get Leo
> keys to work again.
>
> I think Edward also asked wondered why he didn't do it that way in the
> first place - I seem to remember it was attempted but not realized, for
> whatever reason it's great that it works now.

I wouldn't be so sure :-)  For the last two days I have been
attempting to get cycle-all-focus to work properly.  This is the acid
test of Leo's key handling and key binding. The complications are
extreme.

Furthermore, it's difficult to create unit tests that succeed and fail
as expected: the unit testing framework can interfere subtly with
focus issues.  In some cases, the results of execute-script can be
crucially different from the results of running unit tests locally.

As a desperation measure, I have seriously creating a unit test that
merely verifies that a certain set of scripts have been run by hand.
I hope it doesn't come to that, but if it does, I'll put such a script
in a separate section, and have the unit test print a description of
why the test failure isn't necessarily serious...

The good news is that I have a suite of unit tests that must all pass
before I'm going to release any new code. The bad news is that making
the fail properly is not so easy.  In any case, it may take a day or
two more before I have something I have confidence in.

Edward

P.S. As I wrestle with the code, I am coming to believe that
subclassing Qt widgets is a bad anti-pattern in a complex program like
Leo.  There were reasons for doing so, but I'd like eliminate all such
subclasses if possible.

This can not be attempted while I am in the midst of serious changes
to Leo's log and focus code.  The present changes are risky:  I have
already had to revert the code once.  The revert wasn't traumatic: I
just saved the old code and selectively moved the old code into the
reverted code base.  Still, I have no intention of polluting the
present project with extraneous changes.

EKR

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to