Path: utzoo!attcan!uunet!husc6!bloom-beacon!WSL.DEC.COM!haynes From: haynes@WSL.DEC.COM Newsgroups: comp.windows.x Subject: Re: Xtk Resource Converters Message-ID: <8805252116.AA21083@gilroy.dec.com> Date: 25 May 88 21:16:41 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 18 This is one of the reasons I hate C. In a reasonable language you would have module initialization happen automatically at program startup. Since C doesn't do this, you have to do your own initialization MANUALLY. We do some of this for you with the static class initializers, where the class initialization code gets called before the first instance of that class is created, however the mechanism should be more general. It should be possible for a package that exports functionality, like a resource type converter, to have it's initalizer called automatically. Unfortunately no such mechanism exists, and implementing *automatic* package initialization in C is hard. So I'm afraid you're stuck with either initializing all of your classes manually, and registering the type converter in the class initialization code, or providing an explicit intializer for your stuff, and requiring your clients to call it. Wish we had a modern language to do this in... -- Charles