On Wed, 18 Aug 2004, Alan Knowles wrote:
> I though we could inject stuff into the phpdoc block area?
I am a bit confused. What does phpdoc have to do with this?
> That's an interesting subject.. it's kind of like an observer pattern,
> python's syntax for it is really nasty ;)
>
>
> class myObject extends GObject {
> function mysignal_default_signal_hander($self, $var1) {
> .... default implementation....
> }
> function __construct() {
> $s = new GSignal($this,'mysignal', G_SIGNAL_RUN_FIRST,
> 'mysignal_handler');
> echo $s->id; // gets the signal ID..
>
> }
> function some_info() {
> $id = GSignal::lookup($this,'mysignal');
> $name = GSignal::lookup_name($this,1);
> $array = GSignal::list_names($this,1);
> $array = GSignal::list_ids($this,1);
Two of these are present in gtk.org API, but lookup_names() and
list_names() are not. Did you make them up?
> ah.. I see what you are getting at.. - the only kludge I can think of here..
>
> function __construct() {
> $p = new GParam($this,'propname');
> $p->default = .....
> $p->flags = .....
>
> }
>
> of course in C# we would be doing
>
> $this += new GParam('propname');
> :)
Or just $this->install_property()..
- Andrei
--
PHP-GTK Development Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
|