Bernhard,
Do you ever figure out how to do it? Inquiring minds want to know :-)
Jeff
Bernhard Herzog wrote:
>
> "J.W. Bizzaro" <[EMAIL PROTECTED]> writes:
>
> > How about this:
> >
> > >>> from gtk import *
> > >>> adj = GtkAdjustment()
> > >>> print adj.lower
> > 0.0
> > >>> adj.lower = 1.0
> > >>> print adj.lower
> > 1.0
> > >>>
>
> That doesn't work either :(. You're just modifying the instance
> variables of the python instance object, not the values the underlying
> GTK object actually uses. The classes in gtk.py don't implement the
> __setattr__ method (at least not in 0.6.1). They do implement
> __getattr__; that's why 'print adj.lower' works.
>
> Looking at the sources of pygtk, I can't find a way to do this, short of
> creating a completely new adjustment object. It seems to me, though,
> that it wouldn't be hard to extend generate.py to also generate
> functions to modify these attributes (it already generates the functions
> to read them). Perhaps I'll try that and post patches (or mail them to
> James).
>
> --
> Bernhard Herzog | Sketch, a python based drawing program
> [EMAIL PROTECTED] | http://www.online.de/home/sketch/
> To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
--
J.W. Bizzaro mailto:[EMAIL PROTECTED]
Boston College Chemistry http://www.uml.edu/Dept/Chem/Bizzaro/
--
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]