selvamani sampath <selva_infob...@...> writes:
> I designed glade file with the preference as follows:
> 
> Project file format to "GtkBuilder"
> Object name to "within the project"
> Toolkit version to "2.16"
[clip]
> Traceback (most recent call last):
>   File "flower_main.py", line 23, in <module>
>     flower = Flower()
>   File "flower_main.py", line 18, in __init__
>     self.wTree = gtk.glade.XML(self.gladefile)
> RuntimeError: could not create GladeXML object
> selvamani <at> selvamani-laptop:~/Documents/Documents/Selvamani/Project$

Since GTK+ 2.12, libglade has been absorbed into libgtk, as the GtkBuilder
class. When you save files in the GtkBuilder format, you will have to use
GtkBuilder class to create the UI. The corresponding pygtk code is shown below.


      builder = gtk.Builder()
      builder.add_from_file(self.gladefile)

The API reference for gtk.Builder is available at
http://www.pygtk.org/docs/pygtk/class-gtkbuilder.html

Regards,
Vijay

_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to