| FAQ Index - Search - Recent Changes - Everything - Add entry |
19.9. In creating a Gnome Applet, how do I use class members for callbacks?
Just create your verbs list like this in your class:
class MyApplet:
def __init__(self,applet):
verbs = [ ( "Properies", self.properties), ("About",self.about) ]
applet.setup_menu("xml here",verbs,None)
def properties(self):
pass # and display properties
def about(self):
pass # and display about box.
When called, 'self' will be set properly.
