On 1/12/07, Armin Burgmeier <[EMAIL PROTECTED]> wrote: > When wrapping GdaQuery for libgdamm I noticed that every time one wants > to use a GdaQuery in C++ libgda prints an ugly warning to the screen > (and probably does not behave correctly) that is caused by the GdaDict > object declaration system (namely gda_dict_declare_object_as() ). > libgdamm subclasses GdaQuery to allow implementing default signal > handlers and stuff in C++ but this causes said function not to recognize > it as a GdaQuery anymore. > > I am not sure about the semantics of that dict object declaration stuff, > this is why I am asking: Would it be possible to take parent types into > account if no GdaRegisterDictStruct for the given GType was found? I > could come up with a patch if you think that this is OK.
You can try to change gda_dict_declare_object() in gda-query.c with gda_dict_declare_object_as() specifying GDA_TYPE_QUERY as the last argument. This causes GdaDict to take the specified data type instead of the one determined by the object itself (which is obviously not GDA_TYPE_QUERY if you subclass it). This is done for the GdaGraphQuery object which registers itself as a GDA_TYPE_GRAPH. Tell me if it works. Cheers, Vivien _______________________________________________ gnome-db-list mailing list gnome-db-list@gnome.org http://mail.gnome.org/mailman/listinfo/gnome-db-list