Quantcast
Viewing all articles
Browse latest Browse all 28

Switch databinding does not work

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 ?

Viewing all articles
Browse latest Browse all 28

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>