I'm not sure if I should say hi or not, being this my first post here.
Anyway, I am following the glade tutorial from the gtk2hs website. The code compiled properly but when I try to execute it I get this error.
(hellogtk2hs:8670): libglade-WARNING **: Expected <glade-interface>. Got <interface>.
(hellogtk2hs:8670): libglade-WARNING **: did not finish in PARSER_FINISH state
hellogtk2hs: user error (Pattern match failure in do expression at HelloGtk2Hs.hs:8:8-15)
This is my glade file.
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Write your name here: </property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry1">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="box2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkButton" id="button1">
<property name="label">gtk-apply</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<property name="always_show_image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button2">
<property name="label">gtk-close</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
<property name="always_show_image">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
</object>
</interface>
The glade file is in the same directory as my source code. The source code is an exact copy from the one in the tutorial. I have never worked with glade before, so I have no idea of whats going wrong.
I had to downgrade ghc from 7.6 to 7.4.2. I'm using glade 3.14.1, all other packages were installed via cabal so they are on their current version.
If I switch interface with glade-interface, at the beginning and at the end it still complains.
(hellogtk2hs:9636): libglade-WARNING **: Unexpected element <object> inside <glade-interface>.
hellogtk2hs: user error (glade.xmlGetWidget: no object named "window1" in the glade file)
And if change all object tags with widget I get this
(hellogtk2hs:9668): GLib-GObject-ERROR **: cannot create instance of abstract (non-instantiatable) type `GtkBox'
`trap' para punto de parada/seguimiento
I get less errors by doing this but it still does not work.