but I get an error: ‘no matching function for call to ofAddListener’, so I understand that the last parameter is not correct, as the other two are definitely fine.
I’ve tried many variants: using and not using a typedef, making the method templated…, but I can’t quite figure out the correct syntax to make ofAddListener accept my passed method.
i think the problem can be with the typdef, i remember having trouble with typedefs of memeber function pointers. have you tried to define the function without the typdef:
but was calling ofAddListener inside the class ofxFlashEventDispatcher, so in
ofAddListener(testEvent, this, listenerMethod)
this referred to an instance of ofxFlashEventDispatcher, which is not an ofxFlashObject (even if it’s a subclass, more testing to be done…), so changing the method pointer signature to