Fw: [PHP-GTK-DOC] screwed up newlines?

From: Date: Sun, 06 Aug 2006 10:30:45 +0000
Subject: Fw: [PHP-GTK-DOC] screwed up newlines?
Groups: php.gtk.doc 
Request: Send a blank email to php-gtk-doc+get-2759@lists.php.net to get a copy of this message
All - can we please have a discussion about the line we're taking on properties in docs? I know GTK+ manual plumped for hyphens (I guess that's why Christian did the same), but as he pointed out earlier, PHP won't accept hyphens unless they're quoted, which of course they always are if you're using get|set_property(). This is OK except when we have widget fields that are directly accessible but are also widget properties. I guess the chief question is whether the GTK+ team intend phasing out publicly accessible fields in the long term, in which case we'd do better to encourage PHP-GTK users to use get|set property for access anywhere they can (and Christian's approach then makes sense). Does anyone have any word on this? Chris, this really _is_ a CS issue for docs and we need to come to a group decision on it. - Steph
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
-- PHP-GTK Documentation Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php __________ NOD32 1.1380 (20060125) Information __________ This message was checked by NOD32 antivirus system. http://www.eset.com


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