ballhogjoni Posted June 6, 2007 Share Posted June 6, 2007 I get this problem: Parse error: syntax error, unexpected ',', expecting '(' in /home/realfina/public_html/tests/test/alert.php on line 11 for this line of code. $title->modify_fg(Gtk::STATE_NORMAL, GdkColor::parse("#0000ff")); Quote Link to comment https://forums.phpfreaks.com/topic/54451-what-is-wrong-with-this-code/ Share on other sites More sharing options...
trq Posted June 6, 2007 Share Posted June 6, 2007 We need more code than that. Post at least the previous 10 lines or so. Quote Link to comment https://forums.phpfreaks.com/topic/54451-what-is-wrong-with-this-code/#findComment-269300 Share on other sites More sharing options...
ballhogjoni Posted June 6, 2007 Author Share Posted June 6, 2007 <?php $window = new GtkWindow(); $window->set_title($argv[0]); $window->set_size_request(200, 120); $window->connect_simple('destroy', array('Gtk','main_quit')); $window->add($vbox = new GtkVBox()); // display title $title = new GtkLabel("Set up dialog box\n"."Part 1 - hello dialog"); $title->modify_font(new PangoFontDescription("Times New Roman Italic 10")); $title->modify_fg(Gtk::STATE_NORMAL, GdkColor::parse("#0000ff")); // problem line $title->set_size_request(-1, 40); $title->set_justify(Gtk::JUSTIFY_CENTER); $alignment = new GtkAlignment(0.5, 0, 0, 0); $alignment->add($title); $vbox->pack_start($alignment, 0, 0); $vbox->pack_start(new GtkLabel(), 0, 0); $vbox->pack_start($hbox = new GtkHBox(), 0); $hbox->pack_start($button = new GtkButton('popup hello dialog'), 0); $button->connect('clicked', 'on_click'); $window->show_all(); Gtk::main(); Quote Link to comment https://forums.phpfreaks.com/topic/54451-what-is-wrong-with-this-code/#findComment-269303 Share on other sites More sharing options...
thefortrees Posted June 6, 2007 Share Posted June 6, 2007 all i can think of is that your parameters are possibly wrong. Quote Link to comment https://forums.phpfreaks.com/topic/54451-what-is-wrong-with-this-code/#findComment-269311 Share on other sites More sharing options...
trq Posted June 6, 2007 Share Posted June 6, 2007 yeah... I can't see any parse errors. However, I also can't find any documentation on allot of the GtkLabels method calls you are using. What version of Gtk is this? Quote Link to comment https://forums.phpfreaks.com/topic/54451-what-is-wrong-with-this-code/#findComment-269315 Share on other sites More sharing options...
ballhogjoni Posted June 6, 2007 Author Share Posted June 6, 2007 Yea I figured it out. You can only use this if you have php 5.1 or higher. Is there another gtk version I can use for php 4.0? Quote Link to comment https://forums.phpfreaks.com/topic/54451-what-is-wrong-with-this-code/#findComment-269329 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.