On Jan 23, 7:22 am, "Edward K. Ream" <[email protected]> wrote:
> I expect to finish this bug in the next day or so, but that depends on
> making the update rules as simple as possible, but no simpler...
Here are the rules as I understand them at present:
Rule 1: Key settings are handled separately from mode settings.
Rule 2: Deleting a setting deletes the corresponding setting for all
other files.
2a: New non-mode settings for stroke S delete all previous non-mode
settings for S in *other* files.
2b: New mode settings for mode M delete all previous mode settings for
M in *other* files.
Note: the g.bunches describing settings have a _hash field that is
the filename from which the setting came from.
Rule 3: Deleting and adding a setting for stroke S updates the
following dicts:
- k.bindingsDict:
Keys are shortcuts; values are *lists* of
g.bunch(func,name,warningGiven)
- k.masterBindingsDict:
Keys are scope names: 'all','text',etc. or mode names.
Values are dicts: keys are strokes, values are
g.Bunch(commandName,func,pane,stroke)
**Note**: k.inverseBindingDict does *not* needed to be updated because
it is not an ivar.
It is computed by k.computeInverseBindingDict.
Rule 4: Within the *same* file, all non-mode settings for stroke S are
valid, regardless of pane P.
k.masterKeyHandler resolves all potential conflicts.
The above rules suggest two helpers:
- config.delete_shortcut
Deletes shortcut S from config.shortcutsDict, k.bindingsDict and
k.masterBindingsDict
- config.add_shortcut
Adds shortcut S to config.shortcutsDict, k.bindingsDict and
k.masterBindingsDict.
**Important**: these rules may change as they meet implementation
realities or for other reasons...
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.