Re: [PHP-GTK] Button How to intercept signal from a istance of classinto another class
[email protected] (AngeloP) Wed, 29 Oct 2008 05:06:15 -0700 (PDT)
| Newsgroups | php.gtk.general |
|---|---|
| Message-ID | <[email protected]> |
I think you have not understood
It is not possible use this sintax parent::OneFunction();
because the mybuttons doesn't extends mywin class
at this moment I use one method that find parent window for button
In class mybuttons ...
// find window parent
public function get_window(){
$parent = $this;
do{
$w = $parent;
$parent = $w->get_parent();
} while($parent != null);
return $w;
} // Fine cerca window parent
And then callback
function OnClose($button)
{
$win =$this->get_window();
$win->myfunction();
return true;
}
--
View this message in context: http://www.nabble.com/Button-How-to-intercept-signal-from-a-istance-of-class-into-another-class-tp20223469p20225663.html
Sent from the Php - GTK - General mailing list archive at Nabble.com.