Hi Fernando,

Sounds nice. I would be interested in having a bindings-per-morph solution.

Cheers,
Doru


On 31 Jan 2011, at 16:18, Fernando Olivero wrote:

> 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.
> 

--
www.tudorgirba.com

"Yesterday is a fact.
 Tomorrow is a possibility.
 Today is a challenge."




Reply via email to