logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: Custom Signals Support: msg#00024

Subject: Re: Custom Signals Support
Andrei Zmievski wrote:
Elizabeth,

Supporting custom signals will be quite a bit more involved than this. It'll probably be based on created a new class which will contain its signal descriptions and then registering it with GType system. If I have time this weekend I might work on that.. Unless we want to do beta release first.

-Andrei

Evening Andrei,

I didn't mean to imply that the patch did all of custom signal support, just that I had the first part of it working. (you can register new signals with it and they do work)

As far as I'm aware pygtk allows two ways of registering new signals.

The gobject::signal_new method implementation I sent in the patch was just a php version of http://www.pygtk.org/docs/pygobject/gobject-functions.html#function-gobject--signal-new

The difference there is the signal_new I wrote is more flexible in it's callback implementation. Python requires you to have a do_{signalname} method in your class for the callback - I'm not sure if we really want to be adding a ton of magic for a signal callback... and would also force you to extend a base class like gtkwindow in order to be able to add a new signal to it. (python has more flexibility in "adding in" methods to an existing class)

Pygtk also has the support as you mentioned for extending a class by using "magic properties" __gtype__ and a __signals__ so you can give your class a custom gtype and auto register signal. (If you required this for extended classes to have their own signals that would fix the first gtype issue I asked about) I didn't write that support (yet) because I wasn't sure if you wanted to head the pygtk route, or had a different implementation approach in mind.

Second issue still stands - how do you grab the gtype from the zend_class_entry?

And just a random question - why are basic gtype constants defined in gtk and not in gtype or gobject .... just curious

Thanks,
Elizabeth

--
PHP-GTK Development Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>