All unit tests now pass with qt and tk.

This required some ugly tweaks in the tk code.  In particular unit
testing disables tkTree.redraw_after_icons_changed.  This is a
horrible hack, but it prevents the edit widget from changing
unexpectedly in unit tests.  The proper solution is simply to update
the icons (leaving the edit widget unchanged), but I was in no mood
for such detours yesterday.

I had to abandon tests that use w.event_generate.  This call causes no
end of grief. Leo's core does call w.event_generate, so I'll replace
it with something like k.generate_keypress.  The point is that Leo can
bypass the gui event mechanism entirely, and simply synthesize a call
to k.masterKeyHandler.  I won't actual remove event_generate now, but
it will go eventually.

Focus issues remain.  If you haven't work with focus in Leo, you can
not possibly imagine the difficulties involved.  The great danger is
over-simplification.  Obvious approaches do not work.

We want the code to request focus without the focus taking effect
until c.outerUpdate is called.  This eliminates "focus flash", and
more importantly, ensures that requests for focus override changes in
focus that "just happen" to happen.  This has been a real issue for
Tk.

One symptom of focus not being handled properly is that key presses
don't work.  I have tried to create global bindings for Qt, but
mysteriously they don't seem to work.  So missing focus is an
extremely serious issue.

Yesterday I got a shock.  k.masterFocusHandler does nothing.  I don't
know when that happened, but it may be a symptom of an ill-conceived
over-simplification.  I hope not.

I'll work on focus issues in the api-for-redraw branch because subtle
and difficult-to-get-right changes may be needed in Leo's core.
k.masterFocusHandler might have to stage a comeback.

In short, important work remains in the api-for-redraw branch. I have
hopes of merging the two branches in the next day or so.  Until that
happens, I will be preoccupied with tricky code and I'll avoid most
communication.  This will be quiet time for me.

Edward
--~--~---------~--~----~------------~-------~--~----~
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