<div dir="ltr">Hi Dscho,<div><br></div><div><div>> We might need to make _all_ @EventHandler methods have some default</div><div>> non-empty key based on their class and method signature. Otherwise, it</div><div>> will only be possible to override behavior of EventHandler methods that</div>
<div>> take care to provide such a key.</div></div><div><br></div><div>Mark and I looked into doing this, and _almost_ pushed some changes to that effect. However, we realized that it only makes sense to provide a key in the case of singletons. So, for services, it makes sense, but for e.g. a display viewer that listens for DisplayDeletedEvent, it would wreak havoc to limit event handling to only a single instance. We considered adding some cleverness around SingletonPlugin, or even just Service (i.e.: generate a default key if the @EventHandler is in a class compatible with Service), but even then, you may or may not actually want to limit the behavior, depending on which layer of an abstract class hierarchy the event handling method is in.</div>
<div><br></div><div>So for now, until we have a concrete use case otherwise, we are holding off on assigning any default keys. It should be "opt in" -- i.e., a conscious choice -- to say "limit this event handler to only _one_ instance."</div>
<div><br></div><div>-Curtis</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 7, 2014 at 3:56 AM, Johannes Schindelin <span dir="ltr"><<a href="mailto:schindelin@wisc.edu" target="_blank">schindelin@wisc.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Curtis,<br>
<div class=""><br>
On Wed, 6 Aug 2014, Curtis Rueden wrote:<br>
<br>
> P.S. For the very technically inclined (*squints at Dscho*), as well as the<br>
> archives:<br>
<br>
</div>*squints back*<br>
<div class=""><br>
> We might need to make _all_ @EventHandler methods have some default<br>
> non-empty key based on their class and method signature. Otherwise, it<br>
> will only be possible to override behavior of EventHandler methods that<br>
> take care to provide such a key.<br>
<br>
</div>I fully agree!<br>
<br>
Thanks for the concise and informative explanation!<br>
Dscho<br>
</blockquote></div><br></div>