Christian Reis wrote:
>On Wed, Jun 26, 2002 at 12:43:06PM -0400, Gary Jaffe wrote:
>
>
>>The above works fine. Then I tried something like
>>
>>editItem = itemFac.get_item("/File/_Save")
>>
>>but I got an 'AttributeError: get_item' on the first of these last 2 lines.
>>
>>
>
>Well, AttributeError menas that itemFac doesn't contain a get_item
>method. And it doesn't, because I think the proper name is get_widget,
>as you already know. :-)
>
>Talk about inconsistent API naming though.. create_items, delete_item,
>get_...widget? :-)
>
>
Hmm. There should be a get_item() method, but it appears to be missing.
The reason for having get_widget() and get_item() is that some paths
may actually refer to two widgets. In the above case, get_item("/File")
would return the "File" menu item on the main toolbar, while
get_widget("/File") would return the actual menu that gets popped up
when you click on the "File" menu item.
In the above case, get_widget() should work for you.
James.
--
Email: [EMAIL PROTECTED] | Linux.conf.au 2003 Call for Papers out
WWW: http://www.daa.com.au/~james/ | http://conf.linux.org.au/cfp.html
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/