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