ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-gtk-dev
php-gtk-dev
[PHP-GTK-DEV] Custom Signals Support
by Elizabeth Smith other posts by this author
Mar 7 2007 9:14AM messages near this date
[PHP-GTK-DEV] 1 | Re: [PHP-GTK-DEV] Custom Signals Support
I've been working on getting custom signal support written because I'd 
really like to use it in some work I'm doing.

I have Gobject::signal_new implemented and working (also registered the 
signal run type constants).  I've attached the patch for it as well as a 
test script.  However, I've run into a few limitations with the 
implementation.

First of all, signals are assigned globally for a gtype.  Right now php 
classes that extend a php-gtk gtype aren't creating their own gtype but 
just using their parents.  Why is this bad? Well if you extend gtkwindow 
and add a custom signal...the signal is added to gtkwindow (and by 
default also to your extended class) which may not be the intended 
behavior.  Now, it is possible to create new gtypes that extend a parent 
gtype so I know HOW to fix the problem, however I don't know WHERE that 
code needs to go.  Any suggestions?

The second problem is I'd like to allow custom signals to be created 
using just a class name and not an object instance.  I can grab the 
zend_class_entry but right now the gtype is NOT stored in it.  You can 
get the class entry from the gtype...but not the other way around.  Any 
suggestions for fixing that problem?

Otherwise the patch allows custom signals.
Thread:
Elizabeth Smith
Andrei Zmievski
Steph Fox
Andrei Zmievski
Elizabeth Smith

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved