I try to create a class extending GtkSpinButton using new_with_range.
| Code: |
class ESpinButton extends GtkSpinButton {
public function ESpinButton($min, $max, $step) {
parent::new_with_range($min, $max, $step);
$this->get_value();
$this->connect('value-changed', 'cbkSpinDateChange');
}
}
|
When I instantiate the class, I get
PHP Fatal error: Internal object missing in ESpinButton wrapper in /data/www/jjh/intranet/gtk2/Example/php/mainClass.php on line 25
Using
| Code: |
class ESpinButton extends GtkSpinButton {
public function ESpinButton($min, $max, $step) {
parent::__construct();
$this->get_value();
$this->connect('value-changed', 'cbkSpinDateChange');
}
}
|
appears to give me the 'old style' spin button.
How is it done correctly?
Thanks
Peter