Bug 630 - [Chameleon - Label Attribute] Label vs. Label Attribute.
: [Chameleon - Label Attribute] Label vs. Label Attribute.
Status: RESOLVED FIXED
: Chameleon
Core
: 1.99
: PC Windows 2000
: P2 normal
: 2.0 Final
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2004-08-25 17:20 by
Modified: 2005-01-11 10:52 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-08-25 17:20:21
[Chameleon - Label Attribute] Label vs. Label Attribute.

There are to widget attributes called label that serve two different purposes.
There is a Label attribute found within the Button attribute group that labels
buttons. This attribute should be renamed to ButtonLabel.

The other Label attribute is found in the label attribute group which does not
have to be changed.
------- Comment #1 From 2004-09-03 13:07:44 -------
Changed Target to 1.99 Final.
------- Comment #2 From 2004-09-03 13:18:01 -------
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. 
------- Comment #3 From 2004-09-03 13:35:21 -------
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 ... 
------- Comment #4 From 2004-09-09 11:41:43 -------
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.
------- Comment #5 From 2004-09-14 13:57:34 -------
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". 

------- Comment #6 From 2004-09-14 14:06:05 -------
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 ... 
------- Comment #7 From 2004-09-14 14:32:15 -------
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.


------- Comment #8 From 2005-01-11 10:52:44 -------
I think the documentation is sufficiently clear from my review.  Closing.