Re: Connection methods
| From: | Andrei Zmievski | Date: | Fri, 14 Oct 2005 19:29:33 +0000 |
| Subject: | Re: Connection methods | ||
| References: | 1 2 3 4 5 6 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-1824@lists.php.net to get a copy of this message | ||
No, connect_replace() would *not* act like connect_object(). It would substitute user-specified object instead of the signal one, e.g.:
$drawarea->connect_object('button_press_event', 'process_object', $anotherarea);
function process_object($event, $anotherarea)
{
/* note that $anotherarea is passed after event */
}
$drawarea->connect_replace('button_press_event', 'process_replace', $anotherarea);
function process_replace($anotherarea, $event)
{
/* note that $anotherarea is passed in place of the signal widget */
}
And also I'm curious, why do you need connect_object() or connect_replace()? Any specific reason?
-Andrei
On Oct 14, 2005, at 11:18 AM, Steph wrote:
No, it's probably me that's confused :) I'm not good when it comes to discussing things theoretically rather than in practical terms. So what are you saying, Andrei - connect_simple() will _only_ pass user data, and connect_replace() will act as connect_object() did? If so we do need connect_replace()....