error from builder, the IDE for GNOME window.ui 'resource:///plugins/xml-pack/schemas/gtk4builder.rng'

37 Views Asked by At

So I was creating the design for the window.ui using cambalache and the compilation failed. The error message: 1:1 error: Can't validate the schema: 'resource:///plugins/xml-pack/schemas/gtk4builder.rng'

Image from builder, in the above is written Compilation failed, because it is in portuguese, so some red underlined are because of the language

The error message:

[1/1] Generating src/gtk-multi-calculator_gresource with a custom command FAILED: src/gtk-multi-calculator.gresource /usr/bin/glib-compile-resources '../../../../../../../../../Área de Trabalho/Calculator/src/gtk-multi-calculator.gresource.xml' --sourcedir '../../../../../../../../../Área de Trabalho/Calculator/src' --internal --generate --target src/gtk-multi-calculator.gresource --dependency-file src/gtk-multi-calculator.gresource.d ../../../../../../../../../Área de Trabalho/Calculator/src/window.ui:32: parser error : Opening and ending tag mismatch: object line 19 and child ^ ../../../../../../../../../Área de Trabalho/Calculator/src/window.ui:96: parser error : Opening and ending tag mismatch: object line 84 and child ^ ../../../../../../../../../Área de Trabalho/Calculator/src/window.ui:133: parser error : Opening and ending tag mismatch: object line 121 and child ^ ../../../../../../../../../Área de Trabalho/Calculator/src/window.ui:157: parser error : Opening and ending tag mismatch: child line 120 and object ^ ../../../../../../../../../Área de Trabalho/Calculator/src/window.ui:171: parser error : Opening and ending tag mismatch: child line 18 and object ^ ../../../../../../../../../Área de Trabalho/Calculator/src/window.ui:172: parser error : Opening and ending tag mismatch: object line 15 and property ^ ../../../../../../../../../Área de Trabalho/Calculator/src/window.ui:175: parser error : Opening and ending tag mismatch: child line 14 and template ^ ../../../../../../../../../Área de Trabalho/Calculator/src/window.ui:192: parser error : Opening and ending tag mismatch: object line 13 and interface ^ ../../../../../../../../../Área de Trabalho/Calculator/src/window.ui:193: parser error : Premature end of data in tag property line 12

^ ../../../../../../../../../Área de Trabalho/Calculator/src/gtk-multi-calculator.gresource.xml: Child process exited with code 1. ninja: build stopped: subcommand failed.

My window.ui:

<?xml version='1.0' encoding='UTF-8'?>
<!-- Created with Cambalache 0.16.0 -->
<interface>
  <!-- interface-name window.ui -->
  <requires lib="Adw" version="1.0"/>
  <requires lib="gio" version="2.0"/>
  <requires lib="gtk" version="4.0"/>
  <requires lib="gtk" version="4.0"/>
  <requires lib="gio" version="2.0"/>
  <requires lib="libadwaita" version="1.4"/>
  <template class="GtkMultiCalculatorWindow" parent="AdwApplicationWindow">
    <property name="content">
      <object class="AdwToolbarView">
        <child>
          <object class="GtkGrid" id="label">
            <property name="column-spacing">2</property>
            <property name="row-spacing">2</property>
            <child>
              <object class="GtkTextView">
              <object class="GtkBox">
                <property name="halign">end</property>
                <child>
                  <object class="GtkTextView" id="equation_input"/>
                </child>
                <layout>
                  <property name="column">0</property>
                  <property name="column-span">3</property>
                  <property name="row">0</property>
                  <property name="row-span">1</property>
                </layout>
              </object>
            </child>
            <child>
              <object class="GtkBox">
                <property name="halign">end</property>
                <child>
                  <object class="GtkLabel" id="solution_output"/>
                </child>
                <layout>
                  <property name="column">0</property>
                  <property name="column-span">3</property>
                  <property name="row">3</property>
                  <property name="row">4</property>
                  <property name="row-span">3</property>
                </layout>
              </object>
            </child>
            <child>
              <object class="GtkButton">
                <property name="label">[]/[]</property>
                <signal name="clicked" handler="fracFormat_input"/>
                <layout>
                  <property name="column">0</property>
                  <property name="column-span">1</property>
                  <property name="row">1</property>
                  <property name="row-span">1</property>
                </layout>
              </object>
            </child>
            <child>
              <object class="GtkButton" id="input">
                <property name="label">equation input</property>
                <signal name="clicked" handler="equation_input"/>
                <layout>
                  <property name="column">3</property>
                  <property name="column-span">1</property>
                  <property name="row">0</property>
                  <property name="row-span">1</property>
                </layout>
              </object>
            </child>
            <child>
              <object class="GtkLabel">
                <property name="label">ax² + bx + c = 0</property>
                <layout>
                  <property name="column">3</property>
                  <property name="column-span">1</property>
                  <property name="row">1</property>
                  <property name="row-span">1</property>
                </layout>
              </object>
            </child>
            <child>
              <object class="GtkButton">
                <property name="label">log[][]</property>
                <signal name="clicked" handler="logFormat_input"/>
              <object class="GtkButton">
                <property name="label">log[][]</property>
                <layout>
                  <property name="column">0</property>
                  <property name="column-span">1</property>
                  <property name="row">2</property>
                  <property name="row-span">1</property>
                </layout>
              </object>
            </child>
            <child>
              <object class="GtkButton">
                <property name="label">x^[]</property>
                <signal name="clicked" handler="powerFormat_input"/>
                <layout>
                  <property name="column">1</property>
                  <property name="column-span">1</property>
                  <property name="row">1</property>
                  <property name="row-span">1</property>
                </layout>
              </object>
            </child>
            <child>
              <object class="GtkLabel">
                <property name="label">Insert the equation like the format above</property>
                <layout>
                  <property name="column">3</property>
                  <property name="column-span">1</property>
                  <property name="row">2</property>
                  <property name="row-span">1</property>
                </layout>
              </object>
            </child>
            <child>
              <object class="GtkButton">
                <property name="label">[]√[]</property>
                <signal name="clicked" handler="squareFormat_input"/>
              <object class="GtkButton">
                <property name="label">[]√[]</property>
                <layout>
                  <property name="column">2</property>
                  <property name="column-span">1</property>
                  <property name="row">1</property>
                  <property name="row-span">1</property>
                </layout>
              </object>
            </child>
            <child>
              <object class="GtkButton">
                <property name="label">≤ </property>
                <layout>
                  <property name="column">1</property>
                  <property name="column-span">1</property>
                  <property name="row">2</property>
                  <property name="row-span">1</property>
                </layout>
              </object>
            </child>
            <child>
              <object class="GtkButton">
                <property name="label">≥</property>
                <signal name="clicked" handler="biggerEqual_input"/>
                <layout>
                  <property name="column">2</property>
                  <property name="column-span">1</property>
                  <property name="row">2</property>
                  <property name="row-span">1</property>
                </layout>
              </object>
            </child>
          </object>
        </child>
        <child type="top">
          <object class="AdwHeaderBar" id="header_bar">
            <child type="end">
              <object class="GtkMenuButton">
                <property name="icon-name">open-menu-symbolic</property>
                <property name="menu-model">primary_menu</property>
                <property name="primary">True</property>
                <property name="tooltip-text" translatable="yes">Menu</property>
              </object>
            </child>
          </object>
        </child>
      </object>
    </property>
    <property name="default-height">300</property>
    <property name="default-width">600</property>
  </template>
  <menu id="primary_menu">
    <section>
      <item>
        <attribute name="action">app.preferences</attribute>
        <attribute name="label" translatable="yes">_Preferences</attribute>
      </item>
      <item>
        <attribute name="action">win.show-help-overlay</attribute>
        <attribute name="label" translatable="yes">_Keyboard Shortcuts</attribute>
      </item>
      <item>
        <attribute name="action">app.about</attribute>
        <attribute name="label" translatable="yes">_About Calculator</attribute>
      </item>
    </section>
  </menu>
</interface>

It happened before my pull request was merged and before it everything was working perfectly, I have created another branch for the ui, done the merge and a push and doesn't worked anymore. I just want to fix it and make the window.ui after compiling looking like what I maded at Cambalache [What I made in Cambalache(https://i.stack.imgur.com/cWwKR.png) My github repo I am still newby using this IDE and also github, so sorry for my begginer mistakes

2

There are 2 best solutions below

1
Jpk kuhn On

Well I just updated my ui using cambalache and now the program runs, but it's not loading the GtkGrid gtk-multicalculator, but the buttons are next to each other

0
Jpk kuhn On

I discovered that when I add a signal to anything in cambalache, for some reasen the grid broke I published the issue in cambalache repo