> 
> I've got all three running in Squeak 4.1 trunk.  Loading in Pharo will be
> more complicated due to missing dependencies - maybe not worth it.  It might
> be better to catalogue how they work and come up with something simple and
> flexible from scratch?
> 
> There is a solution brewing in my head that generalizes key bindings to a
> condition and action.  So, instead of being restricted to 'when shift and c
> are pressed' you could say 'when shift and c are pressed and a Workspace is
> the active morph'

If I remember (was 8 years ago) the mapping table is shared globally by all 
paragraphEditor
and what you want is that potentially each morph can have its own table.
So I would not attach context to a binding. But more the table been attached to 
a morph
would be active. But I do not have a definitive answer.

Now a trick used by the VW parser to have sharing and instance specific table 
is the following
The trick to get something cool is to have both a class var and an instance var 
that represent
a table: the method only access the table via inst var, at class initialize the 
classVar is initialized
then at instance creation the inst var points to the class var.

=> sharing of the class Var
but now on a specific instance you can copy the table and set up to a give 
object and
it will be used by the object. while others will share the global table.

Workspace class could simply have its own specific table for all instances
Roel Wuyts designed the magic shortcut in VW it worked quite well so I think 
that it would be worth to have a look 
at them. They got integrated in the VW release. 

Stef


> 
> The only thing that seems like it will be complicated is vi bindings (don't
> know enough to say about emacs).  For instance, I can't see how normal mode
> could be implemented without changing some existing classes (for example,
> the cursor must change).
> 
> Sean
> -- 
> View this message in context: 
> http://forum.world.st/Keyboard-Shortcuts-in-Pharo-tp1298784p2217472.html
> Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
> 
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to