I just noticed that the following raises an AttributeError:

#silly illustrative example

def button_click_cb(button):
    print button.name

class MyButton(GtkButton):

    def __init__(self, name):
        GtkButton.__init__(self,name)
        self.name = name

...
button = MyButton("Howdy!")
button.connect("clicked", button_click_cb)


while this does work:

def button_click(button):
    print button['name']

class MyButton(GtkButton):

    def __init__(self, name):
        GtkButton.__init__(self,name)
        self['name'] = name

Is it possible to add support for the former?

Dave
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to