Why is ComboBoxText giving me a "no attribute" error?

Posted by boywithaxe on Ask Ubuntu See other posts from Ask Ubuntu or by boywithaxe
Published on 2012-06-21T20:41:38Z Indexed on 2012/06/21 21:23 UTC
Read the original article Hit count: 214

Filed under:
|

I'm trying to add a text Combo Box into my app. I've created in and populated the list but when I I try to print out the active text I get an error.

Here's the part of the code in question:

    def on_netif_changed(self, widget):
    netif = widget.gtk_combo_box_text_get_active_text()
    print netif

And the error I get:

Traceback (most recent call last):
File "/home/boywithaxe/Developer/Quickly/broadcast/broadcast/BroadcastWindow.py", line 44, in on_netif_changed
netif = widget.gtk_combo_box_text_get_active_text()
AttributeError: 'ComboBoxText' object has no attribute 'gtk_combo_box_text_get_active_text'

I'm a bit at a loss here, I've no problem betting text from text boxes, but this seems a completely different issue. I tried RTFMing but came up short. I would appreciate any suggestions.

© Ask Ubuntu or respective owner

Related posts about python

Related posts about glade