GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Nov 01, 2014 8:23 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Glade GTK+ and Glade3 GUI Programming Tutorial
PostPosted: Tue Mar 18, 2014 7:38 pm 
Offline

Joined: Mon Mar 17, 2014 6:39 pm
Posts: 3
I am new to GTK and am attempting to learn the Glade Interface Designer via the Glade GTK+ and Glade3 GUI Programming Tutorial by Micah Carrick. I use Puppy Linux 4.3.1 which has Glade 3.5.2 installed with GTK 2.14.7.

I have encountered difficulties when attempting to run the gtk-builder-convert in part 1 of the tutorial. The terminal display is as follows:

Code:
# pwd
/usr/glade-tut
# gtk-builder-convert tutorial.glade tutorial.xml
Traceback (most recent call last):
  File "/usr/bin/gtk-builder-convert", line 746, in <module>
    sys.exit(main(sys.argv))
  File "/usr/bin/gtk-builder-convert", line 734, in main
    conv.parse_file(input_filename)
  File "/usr/bin/gtk-builder-convert", line 161, in parse_file
    self._parse()
  File "/usr/bin/gtk-builder-convert", line 233, in _parse
    assert glade_iface, ("Badly formed XML, there is "
AssertionError: Badly formed XML, there is no <glade-interface> tag.
#

Can anyone tell me what is causing this error? Thank you in advance.


Top
 Profile  
 
 Post subject: Re: Glade GTK+ and Glade3 GUI Programming Tutorial
PostPosted: Tue Mar 18, 2014 8:09 pm 
Offline
Familiar Face

Joined: Tue Oct 08, 2013 5:16 am
Posts: 20
That's a really old version of Glade, you could try to upgrade.
Alternatively, if you really want to use that version, post the first and last few lines of your glade file.
Mine looks like this, notice the <interface> and </interface> lines.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
...
</interface>


In Python I'm using this, I don't even convert the file.
Code:
        self.builder = Gtk.Builder()
        self.builder.add_from_file(self.gladefile)


Top
 Profile  
 
 Post subject: Re: Glade GTK+ and Glade3 GUI Programming Tutorial
PostPosted: Wed Mar 19, 2014 11:23 pm 
Offline

Joined: Mon Mar 17, 2014 6:39 pm
Posts: 3
Thanks for your response. This is the glade file. It is just a window with nothing in it.

Code:
<?xml version="1.0"?>
<interface>
  <requires lib="gtk+" version="2.12"/>
  <object class="GtkWindow" id="window1">
    <child>
      <placeholder/>
    </child>
  </object>
</interface>


I considered updating to glade 3.6.7 but when I tried to install it I received errors which I didn't understand.


Top
 Profile  
 
 Post subject: Re: Glade GTK+ and Glade3 GUI Programming Tutorial
PostPosted: Thu Mar 20, 2014 6:40 am 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 768
Location: UK
Hello,

The version of Puppy Linux that you are using 4.3.1 is now very old and dates from 2009. There are now much newer versions of Puppy Linux the latest being 5.7 as I write. I would very much recommend that you up-grade. This would give you the much newer versions of Glade and GTK.

_________________
E.


Top
 Profile  
 
 Post subject: Re: Glade GTK+ and Glade3 GUI Programming Tutorial
PostPosted: Sat Mar 22, 2014 8:27 pm 
Offline

Joined: Mon Mar 17, 2014 6:39 pm
Posts: 3
errol wrote:
Hello,

The version of Puppy Linux that you are using 4.3.1 is now very old and dates from 2009. There are now much newer versions of Puppy Linux the latest being 5.7 as I write. I would very much recommend that you up-grade. This would give you the much newer versions of Glade and GTK.


Unfortunately, newer versions won't run on this old laptop I'm using. It only has 160MB of RAM and 5.7 won't install on it. I was able to overcome the problem that I was having by saving the Glade file using the Libglade file format instead of GtkBuilder format.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group