Accessing GtkCheckButton->label property?
| From: | Benjamin Smith | Date: | Fri, 09 Jul 2004 23:44:50 +0000 |
| Subject: | Accessing GtkCheckButton->label property? | ||
| Groups: | php.gtk.general | ||
| Request: | Send a blank email to php-gtk-general+get-4702@lists.php.net to get a copy of this message | ||
For some reason, the following just doesn't work:
<?
Function ChangeLabel($obj)
{
// this part works OK.
if ($obj->Get_Active())
{
// BUT THIS DOES NOT WORK!
$label=$obj->label;
$label->Set_Text('changed!');
}
}
$win=&New GtkWindow();
$button=&New GtkCheckButton('unchanged');
$button->Connect('toggled', 'ChangeLabel');
$win->Add($button);
$win->Show_All();
?>
Program crashes with error:
Fatal error: Call to member function on a non-object in....
I tried a number of ways to get property label out of $obj, to no avail. Even
$obj->children returned nothing!
Does this work as expected for anybody else?
-Ben
--
"I kept looking around for somebody to solve the problem.
Then I realized I am somebody"
-Anonymous