I am trying to build an app using an object oriented approach that I saw
someone post here before.  The code goes something like this

class GUI(gtk.glade.XML):
        def __init__(self):
                gtk.glade.XML.__init__(self,'the.glade.file,'GUI')
                self.signal_autoconnect(dict(GUI.__dict__))
                self.textWindow = self.get_widget('textWindow')
        def on_button_clicked(self):
                self.textWindow.set_text('this is a test')

Now once and instance of GUI has been set and the user clicks the
button, on_button_clicked gets called, but errors because self then
refers to the gtk.button instance and not the instance of GUI.

Is there a way to access the textWindow object that is set in the
__init__ from the other methodes.

Also if this as a completely wrong way to write the app, please let me
know of an alternative.
-- 

Jay Graves 
[EMAIL PROTECTED]
jay.skabber.com

       O__
      _/`.\
          `=( '

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to