I was thinking about this a bit today, and it has one hole in it.
Consider this code:

button1 = GtkButton()
button2 = None

def cb(btn):
        global button2
        button2 = btn
button1.connect("clicked", cb)
button1.clicked()  # now button1 and button2 point to the same attribute

button1.foo = "Hello"  # set foo in button1.__dict__ and in widget data
print button2.foo      # prints Hello, getting value from widget data
button2.foo = "Bye"    # set foo in button2.__dict__ and widget data
print button1.foo      # prints Hello, from looking in button1.__dict__

Granted that your patch is better than any I have posted so far, but is
this acceptable behaviour?  If people think it is OK, I will apply it.
But if people think that this will cause more confusion than it reduces,
I will have to comment out this section of the code.

James Henstridge.

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


On Sat, 20 Feb 1999, Richard Fish wrote:

> Richard Fish wrote:
> > 
> > Ok, here is my patch to fix this latest problem.
> 
> Er, I mean, HERE it is... ;)
> 
> -- 
> 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