Re: screwed up newlines?

From: Date: Sun, 06 Aug 2006 10:08:48 +0000
Subject: Re: screwed up newlines?
References: 1 2 3 4 5 6 7 8  Groups: php.gtk.doc 
Request: Send a blank email to php-gtk-doc+get-2757@lists.php.net to get a copy of this message
Steph,
I'm having problems with that leap from 'this is what properties are' (which is known) to 'Thus, dashes in the names are ok'.
PHP would not allow the following:
echo $widget->is-realized;
but this works:
echo $widget->get_property('is-realized');
Some are both. C:\php5>php -a Interactive mode enabled <?php $win = new GtkWindow(); $win->set_property('allow_shrink', true); echo $win->allow_shrink; 1 $win->set_property('allow_shrink', false); echo $win->allow_shrink; 0 ?> set_property() works with both underscore and hyphen, but fields ONLY work with underscores: C:\php5>php -a Interactive mode enabled <?php $win = new GtkWindow(); $win->set_property('allow-shrink', true); echo $win->allow-shrink; Notice: Undefined property: GtkWindow::$allow in C:\php5\- on line 4 Notice: Use of undefined constant shrink - assumed 'shrink' in C:\php5\- on line 4 0 echo $win->allow_shrink; 1 echo $win->get_property('allow-shrink'); 1 ?> That's exactly why I think it's going to lead to confusion.
Further, I doubt that using underscores instead of dashes would be liked by gtk.
That'd be funny, because they're _all_ underscores in GTK source :)
-- Regards/MfG, Christian Weiske


« previous php.gtk.doc (#2757) next »