[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-gtk-general
Subject:    [PHP-GTK] connect_object & GtkEventBox
From:       144.138.204.93
Date:       2004-10-03 14:15:40
Message-ID: 20041003141539.86419.qmail () pb1 ! pair ! com
[Download RAW message or body]

Hi,

I am having issues with connect_object() on widgets wrapped in event boxes ,
basically when there is an event box involved there seems to be an extra
argument passed to any callbacks attatched to eventbox related signals.

function do_stuff( $only_argument ){
alert($only_argument);
}
/*this works fine*/
$regular_widget->connect_object('clicked' , array(&$this,'do_stuff')
'only_argument' ) ;
/*but*/
$widget_wrapped_in_GtkEventBox->connect_object('button-press-event' ,
array(&$this,'do_stuff') 'only_argument' ) ;

passes 2 arguments to do_stuff , the first being the GtkEventBox event data
(as an object) the second is the expected argument

Is this a bug , expected behaviour or something I am doing wrong ? , I can
easily bypass the issue by adding a dummy argument to the function &
checking for type (&/or altering `normal` callbacks ) but its messy.

On a side note I can't seem to associate a 'clicked' event via a GtkEventBox
, I can do 'button-press-event' via GDK_BUTON_PRESS_MASK but not 'clicked' ,
is this possible ? if not no worry but its bugging me to know.

Regards,
Simon.

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic