I'm writing more and more ContainerControls that encapsulate a single
control plus other objects, so that I can implement events in the
ContainerControl and to take advantage of the encapsulation provided
by a ContainerControl. It occurs to me that a similar thing could be
done for arbitrary objects. A ContainerObject would function much
like a ContainerControl, in that it would contain other objects. In
it I could implement events of the contained objects, and define an
interface. Essentially this would be a language implement of the
Mediator pattern.
The IDE interface could look like the ContainerControl interface.
The "window editor" mode would simply be a blank canvas onto which
one drops objects.
Obviously one can almost do this already, except for the event
handler delegation that one has for windows and ContainerControls.
But such a device would provide a nice visual representation of the
encapsulation.
I was going to file a feature request, but I thought instead to
generate a little discussion here first. The main disadvantage I see
is that such classes wouldn't be able to (easily) inherit from other
classes, but my experience with ContainerControls suggests that it's
not much of a disadvantage.
--------------
Charles Yeomans
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>