PHP Classes Question
| From: | Barry Mitchelson | Date: | Tue, 06 Mar 2001 16:16:53 +0000 |
| Subject: | PHP Classes Question | ||
| Groups: | php.gtk | ||
| Request: | Send a blank email to php-gtk+get-406@lists.php.net to get a copy of this message | ||
hi (again),
I'm trying to write my Gtk app as part of a class, but I can't connect my class methods as
functions - I get the error :
'connect() expects argument 2 to be callable'
here's a tiny example of what I'm trying to do :
class myApp
{
function myApp()
{
$this->window = &new GtkWindow();
$this->window->connect('destroy',$this->destroy);
}
function destroy()
{
print "destroying...\n";
Gtk::main_quit();
}
function Run()
{
$this->window->show_all();
Gtk::main();
}
}
$app = new myApp();
$app->Run();
the window opens up, but with the above error message. Am I doing something stupid, or have I
missed something somewhere ?
barry
--
http://www.theshining.org
current stats :
4:08pm up 6:43, 5 users, load average: 4.54, 2.87, 1.30