Hey,
Sorry, I tried to sent only the relevant parts of the example, but the
part where the error was, was left out.
I defined the function, used as callback like this:
class SomeClass:
def callback(param):
...
So I forgot the "self" parameter, and therefor the callback had a
differen
On Wed, Jul 7, 2010 at 3:48 PM, Nathan Huesken wrote:
> Hi,
>
> I have a class, where I want to store a callback function as a member
> to access later:
>
> class CallbackClass:
> def setCallback(self,cb):
> self.cb = cb
>
> def callCallback(self, para):
> self.cb(para)
>
> Doi
On 7/7/2010 2:48 PM Nathan Huesken said...
class CallbackClass:
def setCallback(self,cb):
self.cb = cb
def callCallback(self, para):
self.cb(para)
You'll have to show how you're invoking this -- the following works for
me (ie, I don't get an error):
class Callb
On Wed, 07 Jul 2010 22:48:11 +0100, Nathan Huesken
wrote:
Hi,
I have a class, where I want to store a callback function as a member
to access later:
class CallbackClass:
def setCallback(self,cb):
self.cb = cb
def callCallback(self, para):
self.cb(para)
Doing so, I
Nathan Huesken wrote:
Hi,
I have a class, where I want to store a callback function as a member
to access later:
class CallbackClass:
def setCallback(self,cb):
self.cb = cb
def callCallback(self, para):
self.cb(para)
Doing so, I get the error:
callbackFunc() takes exac
Hi,
I have a class, where I want to store a callback function as a member
to access later:
class CallbackClass:
def setCallback(self,cb):
self.cb = cb
def callCallback(self, para):
self.cb(para)
Doing so, I get the error:
callbackFunc() takes exactly 1 parameter (2 given