GtkBuilder 的 PHP-GTK 问题
大家好,我正在 Ubuntu lucid lynx 上使用 Glade 3.6.7 和 PHP-GTK 来创建一些应用程序。在实验过程中,当我在林间空地使用 GtkBuilder 作为项目文件格式时,当我尝试执行一个非常简单的 php 脚本以确保它有效时,我遇到了错误。
<?php
$glade = new GladeXML("test.glade");
Gtk::main();
?>
我收到以下错误
varoom@varoom-laptop:~/public_html/gtk$ php gtk.php
(gtk.php:4800): libglade-WARNING **: Expected <glade-interface>. Got <interface>.
(gtk.php:4800): libglade-WARNING **: did not finish in PARSER_FINISH state
PHP Fatal error: Uncaught exception 'PhpGtkConstructException' with message 'could not construct GladeXML object' in /home/varoom/public_html/gtk/gtk.php:3
Stack trace:
#0 /home/varoom/public_html/gtk/gtk.php(3): GladeXML->__construct('test.glade')
#1 {main}
thrown in /home/varoom/public_html/gtk/gtk.php on line 3
请注意,我从 php 文件中删除了一些注释,因此行号不可靠,尽管我没有任何代码而不是我放在这里的代码。
当我选择 Libglade 作为项目文件时格式化一切顺利,测试运行成功,但有一些小部件被禁用,例如 TextBuffer !
那么我怎样才能将 GtkBuilder 与额外的小部件一起使用呢?
Hello guys I am using Glade 3.6.7 with PHP-GTK on Ubuntu lucid lynx to create some application. During experimenting I got an error when I use GtkBuilder as Project file format in glade when i tried to execute a very simple php script to make sure it works.
<?php
$glade = new GladeXML("test.glade");
Gtk::main();
?>
I got the following error
varoom@varoom-laptop:~/public_html/gtk$ php gtk.php
(gtk.php:4800): libglade-WARNING **: Expected <glade-interface>. Got <interface>.
(gtk.php:4800): libglade-WARNING **: did not finish in PARSER_FINISH state
PHP Fatal error: Uncaught exception 'PhpGtkConstructException' with message 'could not construct GladeXML object' in /home/varoom/public_html/gtk/gtk.php:3
Stack trace:
#0 /home/varoom/public_html/gtk/gtk.php(3): GladeXML->__construct('test.glade')
#1 {main}
thrown in /home/varoom/public_html/gtk/gtk.php on line 3
Please note that i removed some comments from the php file so line numbers are not reliable though i don't have any code rather than what i put here.
When I choose Libglade as project file format everything goes well and the test runs successfully but there are some widgets disabled like TextBuffer !
So how can I use GtkBuilder with the extra widgets right there ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该必须在保存对话框中使用扩展名“libglade”保存您的glade gui - 并非所有gtk构建器都有此功能 ->尝试一下林间空地3.8.5!
格雷茨·罗伯特
you should have to save your glade gui with the extension "libglade" in the save dialog - not all gtk builders have this function -> try out glade 3.8.5 !
greetz robert