README revision c953f6562bc9790b8b04f97ffc6866583e1694f2
c94489fa397a00c551bc087b783123fde4efb904Dav Glass3.0.0 beta1
c94489fa397a00c551bc087b783123fde4efb904Dav Glass
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass* Removed Attribute.CLONE support in the interests of simplicity.
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass Was not being used. Can add support if real demand for it exists.
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass* Changed "set" and "get" configuration properties for setter and
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass getter methods to "setter" and "getter" respectively.
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass* Added support for setter to return Attribute.INVALID_VALUE
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass to prevent attribute state from being changed.
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass This allows developers to combine setter and validator
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass functionality into one method if performance optimization
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass is required.
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass* "validator" is now invoked before "setter". Didn't make sense
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass to validate values which were already massaged by the setter.
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass* Renamed xxxAtt and xxxAtts methods to xxxAttr, xxxAttrs for
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass consistency.
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass* After listeners are only notified if attribute value really
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass changed (using ===).
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass* Extending classes can now overwrite ATTRS configuration propreties
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass from super classes, including writeOnce and readOnly attributes.
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass The ATTRS configurations are merged across the class heirarchy,
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass before they are used to initialize the attributes.
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass* addAttr now prevents re-adding attributes which are already
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass configured inorder to maintain consistent state.
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass* Event prefix wrapper functions (on, after etc.) removed -
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass Event.Target now accepts an event prefix configuration value
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass* Added additional log messages to assist with debugging.
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass* Attribute change events are no longer fired for initial set
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass* Split up State add/get/remove into add/addAll, get/getAll, remove/removeAll
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass to avoid having to create object literals for critical path [ add/get single
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass key values ]
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass
100b8bd9adaf6900bd0dfb6083a8a788ca8cf23cDav Glass* Attribute getter, setter, validator now also receive name
c94489fa397a00c551bc087b783123fde4efb904Dav Glass as the 2nd arg (val, name)
c94489fa397a00c551bc087b783123fde4efb904Dav Glass
c94489fa397a00c551bc087b783123fde4efb904Dav Glass3.0.0PR2
* Added valueFn support, to allowing static
attribute values configuration to set instance
based values.
* Added reset method.
* Added private setter for use by class implementation
code to set readOnly, writeOnce values.
3.0.0PR1 - Initial release
Module Name: "attribute"
Documentation: http://developer.yahoo.com/yui/3/attribute
The Attribute utility allows you to add attributes to any class
through an augmentable Attribute interface. The interface adds
get and set methods to your class for attribute access, in
addition to supporting change events allowing you to listen
for changes in attribute values.