gabrielrcouto / php-gui

Extensionless PHP Graphic User Interface library
2.24k stars 175 forks source link

$application->getWindow() work not well in example demo #137

Open blogdaren opened 6 years ago

blogdaren commented 6 years ago

See: vendor/gabrielrcouto/php-gui/examples/03-window/example.php 【PHP with version 7.2.0 NTS】

$button->on('click', function () use ($button, $application) {
    $window = ($application->getWindow());
    //var_dump($application->getWindow());
    if ($window->getHeight() == 600) {
        $window->setHeight(300);
    } else {
        $window->setHeight(600);
    }

    $button->setCounter($button->getCounter() + 1);
    $button->setValue('Your window was resized ' . $button->getCounter() . ' time(s), click to resize again!');
});

found the "onClick" event was emitted only once, and then i have a debug for "var_dump($application->getWindow())" , also output nothing on terminal. TKS.

reisraff commented 5 years ago

@blogdaren could you try once more with the master branch update?