On Tue, Sep 16, 2003 at 12:20:58PM +0200, Alfredo Braunstein wrote: > > I think you could try to convert the math dispatch to your scheme > > without affecting the rest of LyX. This would give some reference > > implementation of the scheme without duplicated work... > > I was thinking... how about implementing factory.C in a similar way also? > > Every inset could register a constructor standalone function that returns a > base inset given some data. > > Does it make sense?
Yes. [And works fine, I do this in my day time job all over the place]. The only tricky part is to get the 'seemingly unused' static dummy variables whose constructors are used for the registration on startup from a library in a binary ;-} I do this with --whole-archive, but that's not optimal and I do not know how to do this for non-GNU ld. That's the reason why mathed's factory doesn't use it already. Andre' -- Those who desire to give up Freedom in order to gain Security, will not have, nor do they deserve, either one. (T. Jefferson or B. Franklin or both...)