From: Jesse Booher (jbooher_at_[hidden])
Date: 2004-03-04 12:13:17
David Turner wrote:
> At a broader level, I'd argue that there is a good reason to use this
> document/elements design because the type of the widgets have to match the
> type of window they're going to go into.
If we think of a button object as a particular implementation designed explicitly to support a particular window's interface requirements, this is would make sense. However, we might step back from the implementation particulars and consider a button to be a collection of properties such as caption, color, etc. that might at some point get bound to a window at which point the button object could become linked to a widget implementation appropriate to that context.
This opens up the possibility that an object will specify properties that the implementation to which it gets attached does not support, but this is one of the corner stones of object oriented design. An object (e.g. button) advertises it properties and it's up to the user of the object (e.g. window) to realize those properties as best it can.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk