Hi, recently there were some discussion on implementing KeyBindings for our IDE.

There are at least 3 frameworks which address this functionality, the
last one mentioned is the work done by Guillermo.
I've implemented another one, for Gaucho.

>From what i understand, the previous work focuses on implementing
GLOBAL keybindings .
Basically adding behavior to HandMorph or PasteUpMorph or the toolbar
( docking bar) present in the World.

My implementation is a generic keybinding for any Morph, which can be
applied to any morph. Special cases for the docking bar or the paste
up Morph can be easily implemented following this uniform scheme.

I didn't have the time to integrate it into Pharo yet, but will do in
one week from now.

I like to bring up the discussion on which one we should adopt and
integrate into Morphic, points in favor of my approach:
1) clean
2) customizable
3) generic: no special cases

I believe the other Global keybindings should be a subset of this
generic keybinding mechanism.

Fernando

pd: From a previous mail:

"...
 So for example, if you want to delete any  Morph from the system
 by pressing cmd-w, you have to add the following binding:

condition :=  GMCondition
       compositeWith:
                           #( #understandsKeyBindingCommandCondition
                               #uneditedCondition ) ).
    binding := GMKeyBinding
               actingOn: $w asciiValue
               modifiedBy: #(#command)
               satisfying: condition
              applying: #close.
 m := Morph new.
 m addKeyBinding: binding .
...
"

pd2: Useful and related comment from Stef
"..
A classVar Binding and an instance var binding.
**All** the methods only access binding
binding get initialized with the default table defined in Binding
=> we can have table binding sharing
=> we can have instance based customization.

Reply via email to