src/cm/media/js/lib/yui/yui3.0.0/releasenotes/README.attribute
changeset 0 40c8f766c9b8
equal deleted inserted replaced
-1:000000000000 0:40c8f766c9b8
       
     1 3.0.0
       
     2 
       
     3 * set/get can now be called for ad-hoc attributes (attributes which 
       
     4   have not been added/configured).
       
     5 
       
     6 * Fixed issue where custom getters were being called with undefined values,
       
     7   for the initial set.
       
     8 
       
     9 * Limited the case for which an attribute will not notify after listeners, 
       
    10   if the value is unchanged after a set, to primitive values (values for 
       
    11   which Lang.isObject(newVal) returns false).
       
    12 
       
    13   This allows after listeners to be invoked, when resetting the value to 
       
    14   the same object reference, which has properties updated, or arrays with
       
    15   elements modified. 
       
    16 
       
    17 * Attribute broken up into attribute-base and attribute-complex submodules.
       
    18 
       
    19   attribute-complex adds support for complex attributes ({x.y.z : 5}) to
       
    20   addAttrs. 
       
    21 
       
    22 3.0.0 beta 1
       
    23 
       
    24 * Removed Attribute.CLONE support in the interests of simplicity.
       
    25   Was not being used. Can re-evaluate support if real world demand 
       
    26   for it exists. 
       
    27 
       
    28 * Changed "set" and "get" configuration properties for setter and 
       
    29   getter methods to "setter" and "getter" respectively.
       
    30 
       
    31 * Added support for setter to return Attribute.INVALID_VALUE
       
    32   to prevent attribute state from being changed. 
       
    33 
       
    34   This allows developers to combine setter and validator 
       
    35   functionality into one method if performance optimization 
       
    36   is required.
       
    37 
       
    38 * "validator" is now invoked before "setter".
       
    39 
       
    40 * Renamed xxxAtt and xxxAtts methods to xxxAttr, xxxAttrs for
       
    41   consistency.
       
    42 
       
    43 * "after" listeners are only notified if attribute value really
       
    44   changes (preVal !== newVal).
       
    45 
       
    46 * Extending classes can now overwrite ATTRS configuration properties 
       
    47   from super classes, including writeOnce and readOnly attributes.
       
    48 
       
    49   The ATTRS configurations are merged across the class hierarchy,
       
    50   before they are used to initialize the attributes.
       
    51 
       
    52 * addAttr now prevents re-adding attributes which are already 
       
    53   configured in order to maintain consistent state.
       
    54 
       
    55 * Event prefix wrapper functions (on, after etc.) removed - 
       
    56   Event.Target now accepts an event prefix configuration value
       
    57   
       
    58 * Added additional log messages to assist with debugging.
       
    59 
       
    60 * Attribute change events are no longer fired for initial set.
       
    61 
       
    62 * Split up State add/get/remove into add/addAll, get/getAll, 
       
    63   remove/removeAll to avoid having to create object literals for 
       
    64   critical path [ add/get single key values ].
       
    65 
       
    66 * Attribute getter, setter, validator now also receive attribute name 
       
    67   as the 2nd arg (val, name).
       
    68 
       
    69 * If Attributes initialized through addAttrs have a user provided value 
       
    70   which is not valid, the initial attribute value will revert to the 
       
    71   default value in the attribute configuration, if it exists.
       
    72 
       
    73 * reset() no longer resets readOnly or writeOnce attributes. Only 
       
    74   publically settable values are reset.
       
    75 
       
    76 * Added modifyAttr method, to allow component developer to modify 
       
    77   configuration of an attribute which has already been added. The set of 
       
    78   attribute configuration properties which can be modified after it 
       
    79   has been added are limited to getter, readOnly, writeOnce and broadcast.
       
    80 
       
    81 * Added support for lazy attribute configuration. Base uses this feature 
       
    82   to lazily intialize all Attributes on the first call to get/set, for 
       
    83   performance optimization. 
       
    84 
       
    85   lazyAdd:true/false can be used to over-ride this behavior for a 
       
    86   particular attribute. 
       
    87 
       
    88 3.0.0PR2
       
    89 
       
    90 * Added valueFn support, to allowing static 
       
    91   attribute values configuration to set instance
       
    92   based values.
       
    93   
       
    94 * Added reset method.
       
    95 
       
    96 * Added private setter for use by class implementation
       
    97   code to set readOnly, writeOnce values.
       
    98 
       
    99 3.0.0PR1 - Initial release
       
   100 
       
   101 Module Name: "attribute"
       
   102 Documentation: http://developer.yahoo.com/yui/3/attribute
       
   103 
       
   104 The Attribute utility allows you to add attributes to any class 
       
   105 through an augmentable Attribute interface. The interface adds 
       
   106 get and set methods to your class for attribute access, in 
       
   107 addition to supporting change events allowing you to listen 
       
   108 for changes in attribute values.