Ticket #2529979 (accepted enhancement)

Reporter


Satyam
Opened: 02/20/11
Last modified: 09/19/12
Status: accepted
Type: enhancement

Owner


Satyen Desai
Target Release: 3.CURRENT.NEXT
Priority: P4 (low)
Summary: _setAttrs is not to setAttrs as _set is to set
Description:

At this point, _setAttrs and setAttrs are the same, however, _set and set are not. _set allows you to bypass readOnly and writeOnce attributes.
Wouldn't it make sense to have _setAttrs be able to do the same?

Right now I have code like this:


reset: function() {
this.set(VALUE, this.get(INITIAL_VALUE)).
_set(IS_BAD, false).
_set(OLD_VALUE, undefined).
_set(REMOTE_VALUE, undefined);
},

This code is in the same class as the attributes. I can't simply have getters in those readOnly attributes because I need them effectively changed so their change events fire.

I admit, though, that using _set allows me to use constants, which _setAttrs wouldn't allow me to, and that spares me from typos and compresses better and, since _setAttrs simply loops through the
object calling set (instead of _set) it wouldn't save any execution time. So, it is just for the sake of symmetry and because there doesn't seem to be any point in having both setAttrs and _setAttrs.

Type: enhancement Observed in Version: 3.3.0
Component: Attribute Severity: S3 (normal)
Assigned To: Satyen Desai Target Release: 3.CURRENT.NEXT
Location: Library Code Priority: P4 (low)
Tags: Relates To:
Browsers: N/A
URL:
Test Information:

Change History

Satyen Desai

YUI Developer

Posted: 02/21/11
  • milestone changed to 3.4.0
  • status changed from new to accepted

Satyen Desai

YUI Developer

Posted: 07/27/11
  • milestone changed from 3.4.0 to 3.5.0

These are backlog bugs which didn't make it into any of the 3.4.0 sprints. Marking as 3.5.0 backlog for evaluation going into 3.5.0 sprint 1

Satyen Desai

YUI Developer

Posted: 11/8/11
  • estimated changed from 0 to 1
  • remaining changed from 0 to 1
  • sprint changed to sprint 2

Satyen Desai

YUI Developer

Posted: 12/12/11
  • sprint changed from sprint 2

Satyen Desai

YUI Developer

Posted: 03/23/12
  • milestone changed from 3.5.0 to 3.6.0

Moving backlog bugs which didn't fall into a 3.5.0 sprint

Satyen Desai

YUI Developer

Posted: 04/4/12
  • sprint changed to backlog

Jenny Donnelly

YUI Developer

Posted: 07/25/12
  • milestone changed from 3.6.0 to 3.7.0

Moving from 3.6.0 backlog to 3.7.0 so you can triage.

Jenny Donnelly

YUI Developer

Posted: 08/1/12
  • milestone changed from 3.7.0 to 3.6.x

Moving 3.7.0 bugs to 3.6.x for triage.

Jenny Donnelly

YUI Developer

Posted: 09/19/12
  • milestone changed from 3.6.x to 3.CURRENT.NEXT

Jenny Donnelly

YUI Developer

Posted: 09/19/12

Moving from 3.6.x to 3.CURRENT.NEXT