Re: cannot register existing type `LINCConnection'
- From: Tim Janik <timj gtk org>
- To: Michael Meeks <michael ximian com>
- Cc: Botond Botyanszki <botond opt cs kobe-u ac jp>, gconf <gconf-list gnome org>
- Subject: Re: cannot register existing type `LINCConnection'
- Date: Tue, 8 Jul 2003 15:00:19 +0200 (CEST)
On 7 Jul 2003, Michael Meeks wrote:
> Hi Botond,
>
> On Thu, 2003-07-03 at 14:37, Botond Botyanszki wrote:
> > I'm working on a gtk2 input module that uses GConf to store its settings.
> > If the input module is loaded twice I get a segfault caused by GConf.
>
> Ok - so this is most likely because the static variable used to store
> the GType in the foo_get_type() method is re-initialized to 0 - so we
> try to re-register the type.
>
> You walk into a whole can of worms here. I don't recall what the
> official solution is; AFAIR there was some design I saw somewhere once
> to make things like this work - Tim ?
gtk input modules usually:
a) don't conditionalize type registration to a static variable
b) use GTypeModule which takes care of your type registration.
so if you're implementing an input module like the rest
of input modules in gtk, you shouldn't get a warning about
type reregistration.
> Regards,
>
> Michael.
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]