I wanna set a switch value by databinding, unfortunately this does not work as expected.
Please checkout my view below
<Alloy> <Window> <TableView id="table" dataCollection="heroes" onClick="modifyHero"> <TableViewRow title="{name}"> <Switch value="{status}"></Switch> <Label text="{status}"></Label> </TableViewRow> </TableView> </Window> </Alloy>Alloy generates following code for the switch:
var __alloyId6 = Ti.UI.createSwitch({ value: false, });I would expect alloy generating:
var __alloyId6 = Ti.UI.createSwitch({ value: "undefined" != typeof __alloyId3.__transform["status"] ? __alloyId3.__transform["status"] : __alloyId3.get("status") });What I have to do to set the switch value by databinding ?