Andre Poenitz <[EMAIL PROTECTED]> writes:

| On Tue, Sep 16, 2003 at 12:32:36PM +0200, Lars Gullik Bjønnes wrote:
>> Andre Poenitz <[EMAIL PROTECTED]> writes:
>> 
>> | 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 ;-}
>> 
>> IMHO that is the wrong aproach then. No static variables should be
>> used for this.
>> 
>> Rather pretend that your are dynamically loading a lib, and use a
>> function in that lib to give you the object you need for further work
>> (or send registration info to that function and let it handle it.)
>> 
>> (Or I do not really understand what you are talking about.)
>
| I am talking about

Right. And what I am saying then is you this dummy should be avoided
and explicit call of init should be done instead.

Especially because of the problem with statics and constructros in
dynamic libraries.

-- 
        Lgb

Reply via email to