new GtkButton("_Click me", true)
IMO it should be consistent over classes, and requiring a second
parameter for the GtkButton constructor to achieve the same as
GtkCheckButton does without is not consistent.
I just checked and GtkCheckButton does the same thing as GtkButton.
static PHP_METHOD(GtkButton, __construct)
{
..
if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|sb", &text, &use_underline)) {
PHPG_THROW_CONSTRUCT_EXCEPTION(GtkButton);
}
..
}
static PHP_METHOD(GtkCheckButton, __construct)
{
..
if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "|sb", &text, &use_underline)) {
PHPG_THROW_CONSTRUCT_EXCEPTION(GtkCheckButton);
}
..
}
Are you saying it doesn't work?
-Andrei