On Monday 08 September 2003 06:55 pm, Christian Reis wrote:
> On Fri, Sep 05, 2003 at 11:57:22AM +0800, James Henstridge wrote:
> > On 4/09/2003 8:00 AM, Michael McLay wrote:
> > >I received an odd warning when testing the use of get_property.
> > > Accessing the 'child' property for a button returns the message:
> > >
> > >(:2640): Gtk-WARNING **: ../../gtk/gtkcontainer.c:874: invalid property
> > > id 3 for "child" of type `GParamObject' in `GtkButton'
> > >
> > >>>>c.get_property('child')
> > >
> > >(:2640): Gtk-WARNING **: ../../gtk/gtkcontainer.c:874: invalid property
> > > id 3 for "child" of type `GParamObject' in `GtkButton'
> > >
> > >Here's the code that caused this to happen.
> >
> > the GtkContainer::child property is write-only, which is why you get
> > weird results when trying to read it. The other cases are most likely
> > similar.
>
> Would it be possible to raise a proper exception in this case explaining
> it is write-only?
I'm curious, what is the purpose of a write-only property? Under what
circumstances would it be advantagous to not be able to do introspection on a
property? Even if this does raise a special "Write-Only" exception, it still
requires a special work around for code that is looking to probe the state of
the object.
Thanks
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/