On Dec 19, 2007, at 3:47 PM, Benjamin Shine wrote:
The "password" attribute must be specified when the edittext is
being constructed; it can't be changed at runtime. The way you have
it set up, it seems to be determining after construction that
parent.parent.ispassword evalutes to true. At that point, it's too
late.
Look at this:
<edittext width="200" height="24" text="bbbb" password="true" />
<edittext width="200" height="24" text="bbbb" password="${true}" />
Right. Thanks Ben.
Here's my "klever hacker" attempt as suggested in the bug report PTW
posted.
(don't worry, I'll go with a form_text and a form_password!)
Dave
<canvas>
<class name="form_text">
<attribute name="label" value="not set" type="string"/>
<attribute name="ispassword" value="false" type="boolean"/>
<hbox spacing="2">
<view width="120" valign="middle">
<text align="right" text="${parent.parent.parent.label}"/>
</view>
<edittext width="200" height="24"
visible="${!parent.parent.ispassword}"/>
<edittext width="200" height="24" password="true"
visible="${parent.parent.ispassword}"/>
</hbox>
</class>
<simplelayout/>
<form_text label="Username"/>
<form_text label="Password" ispassword="true"/>
<button x="120" text="Submit"/>
</canvas>