Changes between Initial Version and Version 51 of Ticket #7244


Ignore:
Timestamp:
Aug 16, 2008, 2:52:58 AM (11 years ago)
Author:
bill
Comment:

Make description more end-user friendly

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #7244

    • Property Status changed from new to closed
    • Property Resolution changed from to fixed
  • Ticket #7244 – Description

    initial v51  
    1 The attached patch makes a new, powerful, metaphor for getter/setter operations available which ties in with existing common patterns for attribute, node, and getter/setter naming.
     1Support Widget.attr() as canonical method to get/set all widget attributes.  Ex:
     2{{{
     3myWidget.attr('value', 35)   --> set value to 35
     4}}}
     5or
     6{{{
     7myWidget.attr('disabled') --> returns true if widget is disabled
     8}}}
     9
     10Can also pass in a hash of values to set:
     11{{{
     12myWidget.attr({ value: 35, disabled: true} )
     13}}}
     14
     15Internally, attr() will set the widget attribute (aka property) using data in attributeMap. attributeMap has been enhanced to support changes to DOM node innerHTML or class, in addition to DOM node attributes.
     16
     17Developers of widgets can also specify custom getters/setters using a naming convention of _setFooAttr(), _getFooAttr()