On Jul 22, 2010, at 10:08 AM, James Carman wrote:

> On Thu, Jul 22, 2010 at 11:02 AM, Matt Benson <gudnabr...@gmail.com> wrote:
>> I like the compiler-checked aspect of your code, James, considering it 
>> scratches an itch reminiscent of my current work in [proxy].  I'm happy for 
>> your code to survive this POE.
>> 
> 
> I think it reads very well, too.  The fire() method used to be named
> getProxy(), but I like fire() much better because it makes it read
> like a sentence.  I do believe I'm going to make the
> EventUtils.addEventListener() method private.  It really doesn't add
> much value to outside folks.  Its primary purpose is an implementation
> method for the other bindEventsToMethod() method.  WDYT?
> 

Well, I can see *some* value in having it, due to the fact that there are no 
well-known interfaces for *listenable* items.  We could provide a generic 
interface as a wannabe defacto standard, but it would fall down as soon as 
somebody wanted to support multiple listener types on a single object.  I've 
been doing a lot of event-listening code at $work recently (over the past year) 
and this has been a big PITA.  I can't see a way generic enough for [lang] to 
handle this problem, so I might vote for #addEventListener() to remain.  
However, you might add an analogous remove() in that case.  Finally, a bit of 
code to take away from the other event-stuff is the null-checking of the 
added/removed listeners.  ;)

-Matt

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to