Skip to content

Instantiating a template when the runtime GTK version is too old #2095

Description

@martinling

Discovered while testing greatscottgadgets/packetry#239.

The UI file specifies:

<requires lib="gtk" version="4.12"/>

When run on a Windows test system that still had 4.10.5 DLLs in the PATH, the program panics with:

Failed to retrieve template child. Please check that all fields of type `GtkButton` have been bound and have a #[template_child] attribute.

In this case the message is misleading, as the problem is not with a field mismatch, but with a version mismatch.

This is related to #989, but the issue here is with runtime version checking, rather than compile-time checking of the template.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions