Re: [nyphp-talk] Callback syntax

2007-12-13 Thread Brian D.
> call_user_func() treats everything as a static method and will not work. While the variable function might work, could you clarify what you mean by 'treats everything as a static method'? I just ran this:schmoo = $var; } function getSchmoo( ) {

Re: [nyphp-talk] Callback syntax

2007-12-12 Thread John Campbell
> It doesn't seem to work. I'm not sure of the syntax to do this. moveUp( > ) is a method of the class, > but I'm not sure how to tell it, call_user_func( ), since I need the > syntax to be $this->functionName( ). Replace: call_user_func($this->$callbackFunction); with: $this->$callbackFunction()

Re: [nyphp-talk] Callback syntax

2007-12-12 Thread Scott Mattocks
Ben Sgro wrote: It doesn't seem to work. I'm not sure of the syntax to do this. moveUp( ) is a method of the class, but I'm not sure how to tell it, call_user_func( ), since I need the syntax to be $this->functionName( ). If you are trying to call a method of an object or class you need to t

[nyphp-talk] Callback syntax

2007-12-12 Thread Ben Sgro
Hello , I'm trying to do the following: object calling code: $callbackSet = array( " " => "return", "w" => "moveUp"); $key = $object->nonBlockOnInput( ); $object->process($key, $callbackSet); inside the class public function process($callbackSet) {