expressions: Validate lookup expressions

This commit is contained in:
James Westman 2022-04-30 15:20:05 -05:00
parent 3f7688a563
commit c7c32cbb4a
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
8 changed files with 50 additions and 9 deletions

View file

@ -10,7 +10,7 @@
<binding name="visible-child">
<lookup name="parent" type="GtkButton">
<closure function="my_closure" type="GtkButton">
<lookup name="parent">
<lookup name="parent" type="GtkBox">
<constant>box</constant>
</lookup>
</closure>

View file

@ -5,5 +5,5 @@ Overlay {
}
Label {
label: bind ((Label) label.parent.child).label;
label: bind ((Label) ((Overlay) label.parent).child).label;
}

View file

@ -9,8 +9,8 @@
<object class="GtkLabel">
<binding name="label">
<lookup name="label" type="GtkLabel">
<lookup name="child">
<lookup name="parent">
<lookup name="child" type="GtkOverlay">
<lookup name="parent" type="GtkLabel">
<constant>label</constant>
</lookup>
</lookup>

View file

@ -8,7 +8,7 @@
</object>
<object class="GtkBoolFilter">
<property name="expression">
<lookup name="invert">
<lookup name="invert" type="GtkBoolFilter">
<constant>filter</constant>
</lookup>
</property>