On Oct 15, 10:08 am, "Edward K. Ream" <[EMAIL PROTECTED]> wrote:

> Everything related to keys and focus appears to be working.  The new
> code is at rev 1286.

Actually, there was a crasher due to a recent blunder.  Here is the
log for rev 1290, committed several hours ago:

QQQ
  Completed first draft of code to bypass "dangerous" keys:

  - Set module-level safe_mode "constant" to True.
  - Created isDangerous method.
  - Bypass Leo bindings if isDangerous(tkKey,ch) returns True.
QQQ

The log didn't mention the bug fix: I thought nobody had noticed, but
I was wrong :-)

So I think we are *very* close to being able to eat our own dog food.
The isDangerous method is intended to return True for
Return,Tab,Backspace and all arrow keys except Alt-arrow keys.  I
didn't really test it, so it may not work as intended.  It would
probably be better just to list the keys that are not to be allowed.

Anyway, it's a start, and it's self contained.

I also added a 'safe_mode' module-level "constant", which enabled the
isDangerous processing.  To allow all Leo bindings just set safe_mode
= False.

Key handling seems a bit zippier in safe_mode.  More importantly, the
typical keys that require (but don't get) byte offsets in the Leo
implementation get sent straight to Qt. Safe mode is a nice blend of
prototyping and full Leo implementation.

Still to do:

- Issue warnings in leoQtBody if methods get executed that could
return dubious results.
- Draw only visible nodes in leoQtTree.redraw_now.

So *maybe* we are ready to eat our own dog food.  Check it out, but
use caution.

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