Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1390 from nongio/bugfix-eventcallbacks

Bugfix eventcallbacks
  • Loading branch information...
commit 3c9d3174c49bf4c08b69411ce369e7ce1d1fc00d 2 parents 41dffa7 + dc4c214
arturo arturoc authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  libs/openFrameworks/events/ofEventUtils.h
2  libs/openFrameworks/events/ofEventUtils.h
View
@@ -51,11 +51,13 @@ class ofEvent: public Poco::FIFOEvent<ArgumentsType> {
// ofAddListener(addon.newIntEvent, this, &Class::method)
template <class EventType,typename ArgumentsType, class ListenerClass>
static void ofAddListener(EventType & event, ListenerClass * listener, void (ListenerClass::*listenerMethod)(const void*, ArgumentsType&)){
+ event -= Poco::delegate(listener, listenerMethod);
event += Poco::delegate(listener, listenerMethod);
}
template <class EventType,typename ArgumentsType, class ListenerClass>
static void ofAddListener(EventType & event, ListenerClass * listener, void (ListenerClass::*listenerMethod)(ArgumentsType&)){
+ event -= Poco::delegate(listener, listenerMethod);
event += Poco::delegate(listener, listenerMethod);
}
Please sign in to comment.
Something went wrong with that request. Please try again.