Removes an event receiver added previously via :addDirectReceiver(). Must pass on the exact same object that was added.
Removes an event receiver added previously via :addDirectReceiver(). Must pass on the exact same object that was added.
1 table object
the object that was previously added.
2 table eventList
the list of events that this object was bound to handling.
3 string handlerName (optional)
the handler method name that it was bound to handling through, if it was provided.
-- specify the events it should be handling local eventsToHandle = {"someEvent"} -- init the object local object = {handleEvent = function(self, event, data) print("received event", event, "with data", data) end} -- register the receiver events:addDirectReceiver(object, eventsToHandle) -- fire the event events:fire("someEvent", {id = "someID", data = 123}) -- remove the receiver events:removeDirectReceiver(object, eventsToHandle)