Re: general LFUN question

2002-08-16 Thread Juergen Vigna
Andre Poenitz wrote: But that does not solve my current problem of having to call a base class' handlers manually in a derived class as far as I can see. Or does it? I don't understand your problems, but maybe they are local to mathed and it's therefore I don't understand them. Normal insets

Re: general LFUN question

2002-08-16 Thread Andre Poenitz
On Fri, Aug 16, 2002 at 10:39:31AM +0200, Juergen Vigna wrote: Would you care to explain inside which step you have a problem? It was a problem concerning inheritance, not nesting. And outer world example would be CommandInset and LabelInset I believe. With Jean-Marc's suggestion to call the

Re: general LFUN question

2002-08-16 Thread Juergen Vigna
Andre Poenitz wrote: > But that does not solve my current problem of having to call a base class' > handlers manually in a derived class as far as I can see. Or does it? I don't understand your problems, but maybe they are local to mathed and it's therefore I don't understand them. Normal insets

Re: general LFUN question

2002-08-16 Thread Andre Poenitz
On Fri, Aug 16, 2002 at 10:39:31AM +0200, Juergen Vigna wrote: > Would you care to explain inside which step you have a problem? It was a problem concerning inheritance, not nesting. And outer world example would be CommandInset and LabelInset I believe. With Jean-Marc's suggestion to call the

Re: general LFUN question

2002-08-15 Thread Jean-Marc Lasgouttes
John == John Levon [EMAIL PROTECTED] writes: John On Wed, Aug 14, 2002 at 07:10:34PM +0200, Lars Gullik Bjønnes John wrote: | approach with a silly patch a while ago ? Yes, did I shoot it down? John I think we all just um'd and ah'd for a bit ... I for one liked it, except of the concern

Re: general LFUN question

2002-08-15 Thread Andre Poenitz
On Thu, Aug 15, 2002 at 10:17:55AM +0200, Jean-Marc Lasgouttes wrote: John I think we all just um'd and ah'd for a bit ... I for one liked it, except of the concern about performance. Performance is not critical unless proven otherwise ;-) Anyway, if anything from that patch should survive

Re: general LFUN question

2002-08-15 Thread Jean-Marc Lasgouttes
> "John" == John Levon <[EMAIL PROTECTED]> writes: John> On Wed, Aug 14, 2002 at 07:10:34PM +0200, Lars Gullik Bjønnes John> wrote: >> | approach with a silly patch a while ago ? >> >> Yes, did I shoot it down? John> I think we all just um'd and ah'd for a bit ... I for one liked it,

Re: general LFUN question

2002-08-15 Thread Andre Poenitz
On Thu, Aug 15, 2002 at 10:17:55AM +0200, Jean-Marc Lasgouttes wrote: > John> I think we all just um'd and ah'd for a bit ... > > I for one liked it, except of the concern about performance. Performance is not critical unless proven otherwise ;-) Anyway, if anything from that patch should

general LFUN question

2002-08-14 Thread Andre Poenitz
I just wondered: Why is it sensible to have the dispatch switches in each inset? As far as I can tell, the same functionality can achieved by virtual functions for individual LFUNs and a single big switch in the inset base class. The only disadvantage I see is that we'll have 100+ additional

Re: general LFUN question

2002-08-14 Thread Lars Gullik Bjønnes
Andre Poenitz [EMAIL PROTECTED] writes: | I just wondered: Why is it sensible to have the dispatch switches in each | inset? | As far as I can tell, the same functionality can achieved by virtual | functions for individual LFUNs and a single big switch in the inset base | class. | The only

Re: general LFUN question

2002-08-14 Thread Andre Poenitz
On Wed, Aug 14, 2002 at 04:12:20PM +0200, Lars Gullik Bjønnes wrote: | The only disadvantage I see is that we'll have 100+ additional member | functions in the base class (which is certainly not Nice), but the total | effort should be about the same. Do we really want any of those approces?

Re: general LFUN question

2002-08-14 Thread Jean-Marc Lasgouttes
Andre == Andre Poenitz [EMAIL PROTECTED] writes: Andre But that does not solve my current problem of having to call a Andre base class' handlers manually in a derived class as far as I Andre can see. Or does it? What you should do, I think is to have every InsetFoo::dispatch(...) method call

Re: general LFUN question

2002-08-14 Thread Andre Poenitz
On Wed, Aug 14, 2002 at 04:46:29PM +0200, Jean-Marc Lasgouttes wrote: What you should do, I think is to have every InsetFoo::dispatch(...) method call its parent dispatch on the 'default:' of the switch(). Do you have to know explicitely the parent name for that in C++ Yes. But that's no

Re: general LFUN question

2002-08-14 Thread Jean-Marc Lasgouttes
Andre == Andre Poenitz [EMAIL PROTECTED] writes: Andre Anyway, the default: should solve my problem. Except that it will cause problems every time the inheritence chain is changed and one forgets to update dispatch(). JMarc

Re: general LFUN question

2002-08-14 Thread Andre Poenitz
On Wed, Aug 14, 2002 at 04:57:19PM +0200, Jean-Marc Lasgouttes wrote: Andre Anyway, the default: should solve my problem. Except that it will cause problems every time the inheritence chain is changed and one forgets to update dispatch(). Well... this should happen considerably less often

Re: general LFUN question

2002-08-14 Thread John Levon
On Wed, Aug 14, 2002 at 04:12:20PM +0200, Lars Gullik Bjønnes wrote: Wouldn't a system where the insets register LFUNS with the dispatcher (which we would only need one of) be better? Has time started running backwards ? Didn't I illustrate this exact approach with a silly patch a while ago ?

Re: general LFUN question

2002-08-14 Thread Lars Gullik Bjønnes
John Levon [EMAIL PROTECTED] writes: | On Wed, Aug 14, 2002 at 04:12:20PM +0200, Lars Gullik Bjønnes wrote: | | Wouldn't a system where the insets register LFUNS with the | dispatcher (which we would only need one of) be better? | | Has time started running backwards ? Didn't I illustrate

Re: general LFUN question

2002-08-14 Thread John Levon
On Wed, Aug 14, 2002 at 07:10:34PM +0200, Lars Gullik Bjønnes wrote: | approach with a silly patch a while ago ? Yes, did I shoot it down? I think we all just um'd and ah'd for a bit ... regards john -- It is unbecoming for young men to utter maxims. - Aristotle

general LFUN question

2002-08-14 Thread Andre Poenitz
I just wondered: Why is it sensible to have the dispatch switches in each inset? As far as I can tell, the same functionality can achieved by virtual functions for individual LFUNs and a single big switch in the inset base class. The only disadvantage I see is that we'll have 100+ additional

Re: general LFUN question

2002-08-14 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | I just wondered: Why is it sensible to have the dispatch switches in each | inset? > | As far as I can tell, the same functionality can achieved by virtual | functions for individual LFUNs and a single big switch in the inset base | class. > | The only

Re: general LFUN question

2002-08-14 Thread Andre Poenitz
On Wed, Aug 14, 2002 at 04:12:20PM +0200, Lars Gullik Bjønnes wrote: > | The only disadvantage I see is that we'll have 100+ additional member > | functions in the base class (which is certainly not Nice), but the total > | effort should be about the same. > > Do we really want any of those

Re: general LFUN question

2002-08-14 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> But that does not solve my current problem of having to call a Andre> base class' handlers manually in a derived class as far as I Andre> can see. Or does it? What you should do, I think is to have every InsetFoo::dispatch(...)

Re: general LFUN question

2002-08-14 Thread Andre Poenitz
On Wed, Aug 14, 2002 at 04:46:29PM +0200, Jean-Marc Lasgouttes wrote: > What you should do, I think is to have every InsetFoo::dispatch(...) > method call its parent dispatch on the 'default:' of the switch(). Do > you have to know explicitely the parent name for that in C++ Yes. But that's no

Re: general LFUN question

2002-08-14 Thread Jean-Marc Lasgouttes
> "Andre" == Andre Poenitz <[EMAIL PROTECTED]> writes: Andre> Anyway, the default: should solve my problem. Except that it will cause problems every time the inheritence chain is changed and one forgets to update dispatch(). JMarc

Re: general LFUN question

2002-08-14 Thread Andre Poenitz
On Wed, Aug 14, 2002 at 04:57:19PM +0200, Jean-Marc Lasgouttes wrote: > Andre> Anyway, the default: should solve my problem. > > Except that it will cause problems every time the inheritence chain is > changed and one forgets to update dispatch(). Well... this should happen considerably less

Re: general LFUN question

2002-08-14 Thread John Levon
On Wed, Aug 14, 2002 at 04:12:20PM +0200, Lars Gullik Bjønnes wrote: > Wouldn't a system where the "insets" register LFUNS with the > dispatcher (which we would only need one of) be better? Has time started running backwards ? Didn't I illustrate this exact approach with a silly patch a while

Re: general LFUN question

2002-08-14 Thread Lars Gullik Bjønnes
John Levon <[EMAIL PROTECTED]> writes: | On Wed, Aug 14, 2002 at 04:12:20PM +0200, Lars Gullik Bjønnes wrote: | | > Wouldn't a system where the "insets" register LFUNS with the | > dispatcher (which we would only need one of) be better? | | Has time started running backwards ? Didn't I

Re: general LFUN question

2002-08-14 Thread John Levon
On Wed, Aug 14, 2002 at 07:10:34PM +0200, Lars Gullik Bjønnes wrote: > | approach with a silly patch a while ago ? > > Yes, did I shoot it down? I think we all just um'd and ah'd for a bit ... regards john -- "It is unbecoming for young men to utter maxims." - Aristotle