On Wed, Jul 31, 2002 at 07:39:57PM +0200, Lars Gullik Bjønnes wrote: > loose the Tabular -> Table change
I'll come back to this one later (it's unrelated and you're the only one who thinks that not having an English interface is OK...) > action -> Action ok (minor irrelevant stuff) > Please describe the functions of handler_base. You mean: add some comments, or describe to you now what they do ? Like I said it's a sketch, so I haven't paid any major attention to code quality as such > I need some time to digest this so no rash movements now please. Of course ! > I do not like all the "context"'s ... Can you be a bit more explanatory ? > | + return next_context++; > > ++next_context?? sure (but then it needs renaming, no ?) > This looks just opposite than I usually think about it... > > [context][action] > > but you might be right that this is actually more natural I really dunno on this one :) > | +pair<Inset *, action::handler_base const *> action::find(BufferView > | +& bv, int action) > > typedef the pairs sure > | + result = (*h.second)(bv, h.first, arg); > > boost::bind > boost::function > ?? This is more like it - I'll look into what I can do here. > | + struct handler_base { > | + virtual result operator()(BufferView &, Inset *, > | + string const &) const { return result(); } > > I belive that we should use a more descriptive name... "exec" perhaps, > then rather use a binder to get to the functor. (bloat perhaps?) Could do. > | + static context const no_context = 0; > | + static context const lyxview_context = 1; > | + static context const buffer_context = 2; > | + static context next_context; > > Why not let the contexts be strings? > Makes a lot of things a bit easier > (a bit slower... but not exactly a lot...) What things would be easier ? no need for get_context() ? thanks john -- "The simpler it is, the harder it is." - Tim Van Holder