Re: __gtype and constants
| From: | Andrei Zmievski | Date: | Tue, 17 Aug 2004 17:01:02 +0000 |
| Subject: | Re: __gtype and constants | ||
| References: | 1 2 3 4 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-730@lists.php.net to get a copy of this message | ||
On Mon, 16 Aug 2004, Alan Knowles wrote:
> From a documentation and code readibilty angle, these magic vars are
> always a little difficult to understand.
> alot of those look like they should be part of the reflection stuff ???
> __doc__ = $x = new ReflectionClass($object); $x->getDoc();
I don't know if we can modify the default ReflectionClass to do this.
> __signals = GSignal::list_in_object($object);
It's not just for listing them, it's also for specifying them upon
registration. For example see
http://cvs.gnome.org/viewcvs/gnome-python/pygtk/examples/gobject/signal.py?rev=1.4&view=auto
The self.__gobject_init__() is what looks in __signals to see how they
should be registered.
> __properties = $x = new ReflectionClass($object);
> $x->getUserDefinedProperties();
Same thing here.
Perhaps we could come up with a different way of registering them..
> I'm still annoyed you snuck __get / __set / __call in rather than using
> a new language construct :)
Heh, I didn't sneak them in, I just wrote ext/overload! I wish we had a
language construct too.
- Andrei