Is there a better way?
The situation:
I have a list view displaying a collection of objects with item
renderers. I want the list view to respond to state change events
dispatched from the item renderers.
The solution (of sorts):
Created a new ClassFactory to instantiate the renderers which also
registers a delegate (the list view) to receive the events.
Why this sucks:
It's heaps of code to do a tiny thing. Needed to define a factory
class, an interface for the delegate to implement, an implementation
of the interface and an event type class to carry a reference to the
renderer.
Is there a better way?
Many thanks,
Lach