NYCPHP Meetup

NYPHP.org

[nycphp-talk] OO PHP-Gtk

Chris Snyder csnyder at chxo.com
Thu Apr 15 11:31:21 EDT 2004


Scott Mattocks wrote:

> Is this how php-gtk handles callbacks?  I was under the impression 
> that it was done statically.  So that with your example it would look 
> more like:
>
> function connect ($event, $callback) {
>   $callback[0]::{$callback[1]}();
> } 

Could be, don't know. I can see how that would be less than useful. In 
that case you may need to use yet another object to track state (blech):

function clickied() {
    global $state;
     if ($state->wasClicked) {
       echo 'The button was already clickied!';
     } else {
       echo 'This is the first time the button was clicked!';
       $state->wasClicked = TRUE;
     }
}




More information about the talk mailing list