Impossible to inherit from class with composite template
Submitted by Philip Chimento
Created attachment 331453 Minimal script to illustrate the problem
It's not possible to inherit from a class that uses a composite template, because gtk_widget_template_init() is called in the subclass's instance init rather than the parent's.
That's not a very clear explanation, so see attached script that illustrates the problem.
I am at a loss as to how to fix this. It seems that the code currently assumes that only one JS _instance_init() function is to be called per object construction and that it should be called from the most derived class's GObject instance init. As per the documentation of gtk_widget_init_template(), "This function must be called in the instance initializer for any class which assigned itself a template using gtk_widget_class_set_template()", which I interpret to mean that init_template() should be called from the superclass's GObject instance init. This might mean that we have to move template initialization to C.
Attachment 331453, "Minimal script to illustrate the problem":