Sam Tannous wrote:
> So what am I supposed to do now?

Use class attributes referenced from self, or lambda's to pass the class
instance to your callbacks:

from gtk import *
from GDK import *

def ClickedCB(button):
  print button.my_attr

class MyButton(GtkButton):
  my_attr = "Hello there!"
  def __init__(self,*args,**kw):
    apply(GtkButton.__init__,(self,)+args,kw)
    self.connect("clicked",self.MyClickedCB)
    self.connect("clicked",lambda ignore,x=self: ClickedCB(x))

  def MyClickedCB(self,ignore):
    print self.my_attr

b=MyButton()
b.emit("clicked")


-- 
Richard Fish                      Enhanced Software Technologies, Inc.
Software Developer                4014 E Broadway Rd Suite 405
[EMAIL PROTECTED]                    Phoenix, AZ  85040 
(602) 470-1115                    http://www.estinc.com
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to