On Sun, Mar 16, 2003 at 07:57:37PM +0100, David Gil wrote:
> editor=f.get_widget("DobEditor")
> win.add(editor)[...] > Traceback (most recent call last): > File "gladetest1.py", line 10, in ? > win.add(editor) > File "/usr/lib/python2.1/site-packages/gtk.py", line 514, in add > _gtk.gtk_container_add(self._o, child._o) > AtributeError: 'None' object has no attribute '_o' > > Could you please tell me what should I do to insert a widget into the > other one or what should I read to learn how to do it? get_widget() up there is returning None, which is why, when trying to add() it to the window, an exception is raised. The error message is confusing, since it exposes an implementation detail (who cares if widgets have underlying _o attributes). Two problems can be happenning: a) There is no widget named "DobEditor" in your gladefile. b) The GladeXML() parse is failing and you're getting back an empty widget tree (f). Take care, -- Christian Reis, Senior Engineer, Async Open Source, Brazil. http://async.com.br/~kiko/ | [+55 16] 261 2331 | NMFL _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
