I upgraded to 4.2b2 and am trying to figure out and work my way
through all the 'setFoo deprecated' warnings. Here's a good ref:
http://wiki.openlaszlo.org/Runtime_Differences#Attribute_setters_defined_with_.3Csetter.2F.3E
One of the first library files I looked at to get examples was
edittext and came across this for maxlength:
<attribute name="maxlength" value="null" type="number"/>
....
<method name="init">
...
field.setAttribute('maxlength', this.maxlength);
field.setAttribute('pattern', this.pattern);
]]>
</method>
...
<method name="setMaxlength" args="n">
this.setAttribute('maxlength', n);
this.field.setAttribute('maxlength', n);
</method>
Seems like the "setter" tag was not used just to avoid setting the
field attribute before init. But isn't this a bug since field's
maxlength will not be set when edittext.setAttribute('maxlength', 20)
is called? Or, is this a common pattern for setters?
Thanks.