chaining to superclass in CUSTOM_TAG_START



When implementing GtkBuildable with a CUSTOM_TAG_START func like in the
program below, I seem to lose the base GtkWidget tags like
<acceleartor>.  Running it gives

    Unhandled tag: 'accelerator' at buildable-subclass.pl line 26.

Changing "MyThing" in the input string to "GtkButton" shows how I hoped
it would go, with 'x' as an accelerator key to press the button.

Do I do something special in CUSTOM_TAG_START to chain up to the
superclass's custom_tag_start?  The equivalent in C might be something
like

    buildable_parent_iface = g_type_interface_peek_parent (iface);
    ....
    if (buildable_parent_iface->custom_tag_start (...))
      return TRUE;
    ...

Wrapping that looks like hard work.  I wonder if a cheat could be a
special return value from CUSTOM_TAG_START that asks
gtk2perl_buildable_custom_tag_start to chain upwards.  (If that isn't
already possible and I've missed it ... :-)

Attachment: buildable-subclass.pl
Description: Text Data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]