I wasn't talking about configuring widgets like that.  I was talking about
making it so that the following code would work:
  def handler(wid):
        print wid.attribute
  wid.attribute = "Hello World"
  wid.connect("some-signal", wid)
  wid.emit("some-signal")

The setting of properties is still available using label['label'] =
"Hello" type code.  I will probably not put in support forsetting all
properties from the constructor because that would be deviating from GTK+
a bit much (the closer pygtk is to gtk, the less I have to document :)

James Henstridge.

--
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


On Thu, 18 Feb 1999, Richard Fish wrote:

> James Henstridge wrote:
> > 
> > Yep ... that is exactly what I am talking about.  I wish I had thought of
> > this solution earlier :)  I will probably implement it by storing a
> 
> Cool!
> 
> I guess I'll bring up one more convention that would be nice to support:
> 
> l=GtkLabel(label="Hello",alignment=(0,0))
> f=GtkFrame(label="Test Frame",alignment=(0,0),shadow=SHADOW_IN)
> 
> I've missed the ability to create widgets like this since I gave up on
> Tk.  Right now, I use my own wrapper classes to handle this.  But since
> you are going to be adding support for configuring widgets via the
> __setattr__ method, it seems the next logical step is to allow keyword
> arguments to an __init__ method to be filtered through __setattr__.
> 
> What do you think?
> 
> -- 
> 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]
> 

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

Reply via email to