function doClick(e) {
    alert($.label.text);
}



var profiles = [{
    name : "Lily",
    gender : "female",
}, {
    name : "LiLei",
    gender : "male",
}, {
    name : "Poly",
    gender : "unknown",
}, {
    name : "HanMeiMei",
    gender : "female",
}]; 


function _onOpen(e) {
    
    // alert("_onOpen");
    var items = [];
    
    // items.push({template : 'template', info : {text : "属性1"}}); items.push({template : 'template', info : {text : "属性2"}});
    // items.push({template : 'template', info : {text : "属性3"}}); items.push({template : 'template', info : {text : "属性4"}});
    
    _.each(profiles, function(profile) {
        items.push({template : 'template', name : {text : profile.name}, gender : {text : profile.gender}});
    });
    
    $.mainSection.setItems(items);
}

function _doItemClick(e) {

    // alert(JSON.stringify(e));   


    // Ti.API.info(profiles[e.itemIndex]);
// 
    // var options = {};
//     
    // if (e.itemIndex == 0) {
        // options.name = "Lily";
        // options.gender = "female";
    // } else if (e.itemIndex == 1) {
        // options.name = "LiLei";
        // options.gender = "male";
    // } else if (e.itemIndex == 2) {
        // options.name = "Poly";
        // options.gender = "unknown";
    // } else if (e.itemIndex == 3) {
        // options.name = "HanMeiMei";
        // options.gender = "female";
    // }
//     
    // Ti.API.info(options);
    
    var controller = Alloy.createController("render", profiles[e.itemIndex]);
    
    controller.getView().open();
}
var path = Ti.Filesystem.getFile(Ti.Filesystem.getResourcesDirectory(), '/templates/index.html');
Ti.API.info("parent ==>", Titanium.Filesystem.getFile(path.resolve()).getParent());
// Ti.API.info("parent ==>", Titanium.Filesystem.getFile(path.resolve()).getParent());

$.index.open();

@@ -293,1535 +293,379 @@
     
-// alert(%22_onOpen%22);%0A    var items = %5B%5D;%0A    %0A    // items.push(%7Btemplate : 'template', info : %7Btext : %22%E5%B1%9E%E6%80%A71%22%7D%7D); items.push(%7Btemplate : 'template', info : %7Btext : %22%E5%B1%9E%E6%80%A72%22%7D%7D);%0A    // items.push(%7Btemplate : 'template', info : %7Btext : %22%E5%B1%9E%E6%80%A73%22%7D%7D); items.push(%7Btemplate : 'template', info : %7Btext : %22%E5%B1%9E%E6%80%A74%22%7D%7D);%0A    %0A    _.each(profiles, function(profile) %7B%0A        items.push(%7Btemplate : 'template', name : %7Btext : profile.name%7D, gender : %7Btext : profile.gender%7D%7D);%0A    %7D);%0A    %0A    $.mainSection.setItems(items);%0A%7D%0A%0Afunction _doItemClick(e) %7B%0A%0A    // alert(JSON.stringify(e));   %0A%0A%0A    // Ti.API.info(profiles%5Be.itemIndex%5D);%0A// %0A    // var options = %7B%7D;%0A//     %0A    // if (e.itemIndex == 0) %7B%0A        // options.name = %22Lily%22;%0A        // options.gender = %22female%22;%0A    // %7D else if (e.itemIndex == 1) %7B%0A        // options.name = %22LiLei%22;%0A        // options.gender = %22male%22;%0A    // %7D else if (e.itemIndex == 2) %7B%0A        // options.name = %22Poly%22;%0A        // options.gender = %22unknown%22;%0A    // %7D else if (e.itemIndex == 3) %7B%0A        // options.name = %22HanMeiMei%22;%0A        // options.gender = %22female%22;%0A    // %7D%0A//     %0A    // Ti.API.info(options);%0A    %0A    var controller = Alloy.createController(%22render%22, profiles%5Be.itemIndex%5D);%0A    %0A    controller.getView().open();%0A%7D%0Avar path = Ti.Filesystem.getFile(Ti.Filesystem.getResourcesDirectory(), '/templates/index.html');%0ATi.API.info(%22parent ==%3E%22, Titanium.Filesystem.getFile(path.resolve()).getParent());%0A// Ti.API.info(%22parent ==%3E%22, Titanium.Filesystem.getFile(path.resolve()).getParent());
+var items = %5B%5D;%0A    %0A    _.each(profiles, function(profile) %7B%0A        items.push(%7Btemplate : 'template', name : %7Btext : profile.name%7D, gender : %7Btext : profile.gender%7D%7D);%0A    %7D);%0A    %0A    $.mainSection.setItems(items);%0A%7D%0A%0Afunction _doItemClick(e) %7B%0A    %0A    var controller = Alloy.createController(%22render%22, profiles%5Be.itemIndex%5D);%0A    %0A    controller.getView().open();%0A%7D
 %0A%0A$.

remove unused code