Re: PHP-GTK in PHP Magazine [Re: PHP-GTK in PHP|A]
| From: | Scott Mattocks | Date: | Wed, 01 Sep 2004 14:15:17 +0000 |
| Subject: | Re: PHP-GTK in PHP Magazine [Re: PHP-GTK in PHP|A] | ||
| References: | 1 2 3 4 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-5026@lists.php.net to get a copy of this message | ||
Christian Weiske wrote:
That's so not right: connect_object omits the first parameter (the emitting widget) which is passed (as first parameter) when using connect() only. You can pass any number of self-defined parameters, if you use connect or connect_objectOk. Sorry for the confusion. So to correct and summarize, if you want to use an object method with any call back you pass it using array(&$obj, 'methodName') and if you want your callback to work on a particular widget you need to pass it as the third parameter to one of the connect methods. If you use connect() your function definition would look like this: function ($callingWidget, $otherWidget[, $moreStuff...]) {...} and if you use connect_object(): function ($otherWidget[, $moreStuff...]) {...} Scott Mattocks