2006/11/1, Magyar Tibor <[EMAIL PROTECTED]
>:
I have this very simple login interface. The "ispass"
attribute sets the "password" attribute of the edittext tag.
But it don't works! Is it a bug? Because for example, if I
change the "password" attribute to "visible" attribute, then
everything is fine.
password is tag only and final while visible is tag and JS and it's not final at all.
Probably this is the root of the problem: the edittext element is constructed with its default "password" value and when later on should be changed, the system can't do it. You could probably solve this problem by creating the edittext object during the oninit procedure of the inputfield class!
Here is a working example: please, forgive any trivial error taking into account I'm completely new to Laszlo!
<canvas height="200" width="500">
<simplelayout axis="y" spacing="5" />
<class name="myedittext" extends="edittext" />
<class name="inputfield" height="25" width="50">
<method event="oninit"><![CDATA[
var x = new myedittext(this, {password:this.ispass});
]]></method>
<attribute name="label" type="string"/>
<attribute name="ispass" value="false" type="boolean"/>
<simplelayout axis="x"/>
<text text="${parent.label}"/>
</class>
<inputfield label="Name:" />
<inputfield name="pwd" label="Password:" ispass="true"/>
</canvas>
--
Matteo
