[AC-1307] Boolean value set in Alloy mark-up is being parsed to string as either "false" or "true" in controller
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2014-07-07T04:23:40.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Alloy |
Labels | core, defect |
Reporter | David He |
Assignee | Mauro Parra-Miranda |
Created | 2014-07-05T07:42:47.000+0000 |
Updated | 2016-03-08T07:37:42.000+0000 |
Description
Expected Result
No alert message is seenActual Result
Alert is triggered
<Alloy>
<Window>
<TextField editable="false" id="tf1" />
</Window
</Alloy>
if($.tf1.editable) {
alert("it is editable!!"); //invoked as editable is being evaluated as //string "false"
}
Hello, We tested this issue with our modified sample code bellow. We can’t reproduce this issue. It’s working as expected with Titanium SDK 3.3.0 RC. In TextField object, editable property value should be Boolean type but given by string. If we change string type to Boolean then its working perfect.
to
Thanks
Please use editable=false
Surprisingly, Alloy mark-up can have attribute values without being quoted!!!!! See XML definition from [W3C](http://www.w3schools.com/xml/xml_syntax.asp)