katcipis / luanotify

Luanotify is a Lua package providing tools for implementing observer programming pattern
http://wiki.github.com/katcipis/luanotify
GNU Lesser General Public License v3.0
20 stars 4 forks source link

Passing event name to accumulator #14

Closed katcipis closed 14 years ago

katcipis commented 14 years ago

This might be a problem, accumulators receive as parameters the return of each handler call, the Signal class does not support any kind of special parameter, it simply call the handlers passing the return of them to the accumulator. Implementing a accumulator that receives the emmited event name as first parameter would make necessary remaking something on the Signal class or dont using the Signal class at all on the event system.

katcipis commented 14 years ago

handlers can return the event where the are connected to the accumulator, so we do not need the event name on accumulators.