Summary: | [Chameleon - Label Attribute] Label vs. Label Attribute. | ||
---|---|---|---|
Product: | Chameleon | Reporter: | Chris Thorne <cthorne@dmsolutions.ca> |
Component: | Core | Assignee: | chameleon-dev <chameleon-dev@lists.maptools.org> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 1.99 | ||
Target Milestone: | 2.0 Final | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Changed Target to 1.99 Final.
While I agree that it would be good to minimize unnecessary attribute name duplication across widgets, I'm not sure I see the logic in this bug. There are plenty of attribute names that are "re-used" in different widgets. "image" is in several widgets plus in the ButtonWidget Shared Resource. If we were to rename "label" to "ButtonLabel", would we not also have to rename "image" to "ButtonImage" - and "ImageTip" to "ButtonImageTip", etc., etc. My personal thinking is that so long as the attribute name adequately describes the purpose *within the context it is in*, then having duplicate names in different widgets is OK. We need to balance the need for complete clarity with wanting to have shorter, easier-to-type names. I'm not sure we could ever effectively eliminate all duplicate attribute names.
I agree with Darren ... many HTML elements share attribute names (eg, width and height). The nice thing is that you don't have remember specific attribute names for any element ...
I am not suggesting that we change everything, the point of this bug is that the Label attribute is found in two separate attribute groups. Button and Label attribute group. If a widget uses both Button and a Label attribute group as an example. Than there will be two Label attributes for the same widget. This should be clear, to the application developer. As for Darren's comments: "If we were to rename "label" to "ButtonLabel", would we not also have to rename "image" to "ButtonImage" - and "ImageTip" to "ButtonImageTip", etc., etc." I would have to agree with these changes, but I do not wish to push this issue.
I understand what you're saying now, Chris. Sorry for the confusion. There is indeed a conflict between the Button and Label attribute groups concerning the "Label" attribute. We've probably never run into it because there aren't currently any widgets that take both groups - that I can see. (Have *you* seen any?) This doesn't mean that some developer won't want to create such a widget in the future. I agree that the "Label" attribute in the Button group should be renamed "ButtonLabel".
I'd actually like to drop the label group entirely since it really isn't necessary any more. It is more of a hang-over from the old days ...
This change will not occur until post 2.0 right? If that is the case than we still have to be clear. This weather we are clear in documenation or within the widget tag.
I think the documentation is sufficiently clear from my review. Closing.