[PEAK] An event system based on RuleDispatch
dangoor at gmail.com
Mon Apr 24 15:21:10 EDT 2006
This is mostly a sanity check, because I'm pretty sure I've got the
right idea here.
A typical event system has a function that registers listeners for a
given event. The listeners are just callback functions that may or may
not take some kind of parameters.
It seems to me that by using RuleDispatch you could make an event
system that is a bit more flexible because RuleDispatch could do some
filtering on the events before they land on a given listener function.
The only thing that seems different about an event system vs. "normal"
generic function use is that you can have several functions that all
match and should all be called. IIRC, you can create a custom combiner
that would know to call each function that matches. Is that correct?
TurboGears / Zesty News
email: kid at blazingthings.com
More information about the PEAK