[prev in list] [next in list] [prev in thread] [next in thread]
List: php-gtk-general
Subject: [PHP-GTK] php-gtk and bcompiler: problems...
From: "=?ISO-8859-15?Q?Andr=E9_Jansen?=" <theflyingdutchman () libero ! it>
Date: 2007-03-05 16:28:54
Message-ID: 45EC5356.31937.3C6A89 () theflyingdutchman ! libero ! it
[Download RAW message or body]
Hi All,
(may be slightly off topic, but I understand that there's quite some
interest in bcompiler in the php-gtk community, and also that Alan K.
reads this list :))
I spent a nice sunday evening trying to get bcompiler to work, but no
luck.
Most of the classes I use are - as might be expected - custom extensions
of Gtk widgets, like so:
class myWidget extends GtkWidget
{
public function __construct($name) {
parent::__construct();
$this->set_name($name);
...
}
...
}
I generated bytecode as follows:
include('mywidget.php');
$fh = fopen('mywidget.phb','wb');
bcompiler_write_header($fh);
bcompiler_write_class($fh,'myWidget','GtkWidget');
// the third parameter here is called 'extends', according to
// the documentation...
bcompiler_write_footer($fh);
fclose($fh);
So far, so good.
When I attempt to load the generated code...:
include('mywidget.phb');
$foo = new myWidget('bar');
... the script dies, complaining loudly that myWidget::set_name() is
undefined.
In other words, any and all methods that myWidget should have inherited
from GtkWidget got lost somewhere.
However, when I open the bytecode with a hex editor I can see the names
of all of GtkWidget's methods, in plain text near the end of the file :)
For the record, I used the win32 bcompiler dll from snaps.php.net, 5.1
branch, with everything else being Gnope 1.5...
Am I doing something terribly wrong, or is this a bcompiler issue?
Any pointers welcome.
--
André
===========================================================
Black Holes were created when God divided by zero.
--
PHP-GTK General Mailing List (http://gtk.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic