Re: [pygtk] Finding out a widget's parent
- From: James Henstridge <james daa com au>
- To: Christian Robottom Reis <kiko async com br>
- Cc: David Everly <deckrider yahoo com>, <pygtk daa com au>, <gtk-app-devel-list gnome org>
- Subject: Re: [pygtk] Finding out a widget's parent
- Date: Thu, 16 Aug 2001 23:10:13 +0800 (WST)
On Tue, 14 Aug 2001, Christian Robottom Reis wrote:
On Fri, 10 Aug 2001, James Henstridge wrote:
These correspond to the get_property() and set_property() methods in
pygtk2. It is using the obscure mapping behaviour because that is what
was used in Tkinter for properties. Unfortunately, people don't often
find this :(
Can properties available through get_property() be generically made
available through regular __getattr__() attributes? I'd be willing to
hack this in if it's not impossible..
Yes, this would probably be possible.
The easiest way to do so would be to modify pygobject_getattro and
pygobject_setattr to check for paramspecs.
By making this a fallback in pygobject_getattro, it shouldn't add much (if
any) of a hit to attribute lookups. I don't know about the setattr one
though.
James.
--
Email: james daa com au
WWW: http://www.daa.com.au/~james/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]