On Mon, 4 Oct 2004, Mike Stanley wrote:

> On Mon, 2004-10-04 at 15:14, Jung, Eric wrote:
>
> > You might also consider using java.util.EventListener,
> > java.util.EventListenerProxy, and java.util.TooManyListenersException as
> > appropriate. All of these were introduced in JSDK 1.3.
>
>
> Events have been around a while in JDK (since 1.1).  My implementation
> takes a different approach to events than the JDK.  Where the JDK uses
> Class signatures, interfaces, and event objects, I utilize reflection
> and method invocation.  Allowing more arbitrary invocation of methods.
> Using this delegateMethod/event registry approach, any existing
> class/method can be invoked when an event is fired/raised.  Without
> requiring classes to implement an interface or signature.  Look at
> .NET's events and delegates.  They do something similar to this.
>
> Let me package everything up and then contribute it.  Then it may be
> easier for me to demonstrate what I'm trying to accomplish.
>
> - Mike
>
> p.s.  I'm not advocating that this is a better way of handling events,
> just a different approach.  (I do believe it is more convenient and
> flexible to utilize.  especially when adding events and event handlers
> to existing components.)  I also think this fits nicely with frameworks,
> and other patterns such as the chain of responsibility.


For what it's worth, my approach has been to adapt the event pattern in
Swing for other purposes.  I've documented that pattern and provided
velocity source code generation templates in

> http://shore.net/~heuermh/event-codegen-1.0.tar.gz

   michael


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to